'react-bootstrap' does not contain an export named 'MenuItem
文章推薦指數: 80 %
I tried doing npm start, and receiving the following error. ./src/app.js 104:16-24 'react-bootstrap' does not contain an export ... 'react-bootstrap'doesnotcontainanexportnamed'MenuItemreactjs05January2022-1answerAdItrieddoingnpmstart,andreceivingthefollowingerror../src/App.js 104:16-24'react-bootstrap'doesnotcontainanexportnamed'MenuItem HowcanIfixthis?ItrieddoingnpminstallReferenceCode:import{Nav,Navbar,NavDropdown,NavItem,MenuItem}from'react-bootstrap'; AdAnswerInnewversionsofbootstrapitisDropdown.ItemnotMenuItem.CheckhereAdsource:stackoverflow.com←PreviousPostNextPost→RelatedQuestions→ImportstatementandBabel→shouldIchoosereactjs+f7orf7+vue.js?→UncaughtTypeError:Cannotreadproperty'__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED'ofundefined→.tsxwebpackcompilefails:Unexpectedtoken
延伸文章資訊
- 1React-Bootstrap - importing modules - Stack Overflow
react-bootstrap doesn't have a default export, so the default import syntax ( import ReactBootstr...
- 2Using Bootstrap with React - LogRocket Blog
As a result, it's no longer necessary to use a DOM library, such as jQuery, to build web apps. Th...
- 3Dropdowns | React-Bootstrap
ARIA menus, must only contain role="menuitem" , role="menuitemcheckbox" ... Historically dropdown...
- 4A simple dropdown menu for React with Bootstrap icon trigger
Include bootstrap in your project(if not already included) ... React from 'react'; import { Dropd...
- 5Attempted Import Error: 'Toast' Is Not Exported From 'React ...
There is an open issue in their github repo: https://github.com/reactbootstrap/reactbootstrap/iss...