reactjs - 当我在项目中的任何地方都看不到引导程序时,我的 React 应用程序如何使用引导程序类名称?
问题描述
我在整个项目中搜索了“bootstrap”但没有结果,但我可以使用类似的东西
<h2 className="text-primary">{name}s Bio</h2>
,我怎么能使用它?默认情况下,引导程序是项目的一部分吗?这是我的 package.json 文件...
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.19.2",
"moment": "^2.26.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-moment": "^0.9.7",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0",
"uuid": "^8.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"proxy": "http://localhost:5000"
}
解决方案
Bootstrap 和其他库也可以通过index.html
文件作为 CDN 添加,因此您可以检查标头是否包含它。
推荐阅读
- java - Spring JPA:如何在同一个请求中更新 2 个不同的“DataSource”中的 2 个不同的表?
- node.js - 了解 NodejS 中的 Express 会话
- generics - 在 F# 中,两种泛型类型约束表示有什么区别
- excel - 根据收费汇总占用面积,但不包括重复项
- android - 实施 'com.android.support:appcompat-v7:28.0.0' - 无法解决:firebase-core/auth-15.0.0
- android - 仅显示电子邮件程序时发送电子邮件
- angular - 无法在 Angular 材料表中设置未定义错误的属性“filterPredicate”
- xamarin - 检测 Xamarin Forms 中的网络更改
- java - 在“::”双冒号表示法中内省方法引用?
- javascript - 选中复选框上的 Javascript 克隆此 div,未选中删除此 div