首页 > 解决方案 > 当我在项目中的任何地方都看不到引导程序时,我的 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"
}

标签: reactjsreact-bootstrap

解决方案


Bootstrap 和其他库也可以通过index.html文件作为 CDN 添加,因此您可以检查标头是否包含它。


推荐阅读