React router and React Bootstrap
So, I'm going to try something that I heard on a podcast that I was listening to recently. I'm going to blog about the things I'm struggling with. Hopefully it will turn into a great resource for both me and you.
Without further ado...
I'm having a problem getting my links to work with react router AND react-bootstrap.
The first issue was that when I tried to combine the <NavItem> Component with the <Link> component, I would get an error.
A little research led me to install react-router-bootstrap which is supposed to join the two so that link will work with react-bootstrap.
After I install and npm start, I find that my code is not rendering to the browser. There isn't any errors showing on the terminal, however the browser is showing these errors and the browser is not rendering anything as in the page is completely blank.
After trying multiple options, I ran across this site:
https://github.com/react-bootstrap/react-bootstrap/issues/2365
turns out that react-router-bootstrap was unnecessary (and didn't fix the problem). What worked was removing the "collapseOnSelect" from <Navbar inverse collapseOnSelect>.
Once that was removed, not only did the page show up, the links worked!
Without further ado...
I'm having a problem getting my links to work with react router AND react-bootstrap.
The first issue was that when I tried to combine the <NavItem> Component with the <Link> component, I would get an error.
A little research led me to install react-router-bootstrap which is supposed to join the two so that link will work with react-bootstrap.
After I install and npm start, I find that my code is not rendering to the browser. There isn't any errors showing on the terminal, however the browser is showing these errors and the browser is not rendering anything as in the page is completely blank.
After trying multiple options, I ran across this site:
https://github.com/react-bootstrap/react-bootstrap/issues/2365
turns out that react-router-bootstrap was unnecessary (and didn't fix the problem). What worked was removing the "collapseOnSelect" from <Navbar inverse collapseOnSelect>.
Once that was removed, not only did the page show up, the links worked!
Comments
Post a Comment