提问人:Rohith 提问时间:11/15/2023 最后编辑:James HibbardRohith 更新时间:11/17/2023 访问量:62
我想在react中使用bootstrap模板,无法使用javascript文件
I want to use the bootstrap template in react , unable to use javascript files
问:
我想尝试在 React 中使用引导模板。我在组件页面中导入了所有CSS文件。
但是我无法使用JavaScript文件。我把它们导入体内。为了正常工作,我该怎么办?public/index.html
我为CSS尝试了这个。CSS工作正常
我尝试在这里添加jS,但没有用
答:
-1赞
Nishant Fulara
11/15/2023
#1
我认为为了确保 JS 顺利运行,您需要使用文档中提到的脚本,如需更多参考,请不要忘记查看文档 -> https://react-bootstrap-v4.netlify.app/getting-started/introduction
<script src="https://unpkg.com/react/umd/react.production.min.js" crossorigin></script>
<script
src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"
crossorigin></script>
<script
src="https://unpkg.com/react-bootstrap@next/dist/react-bootstrap.min.js"
crossorigin></script>
评论
import