showing results for - "how to navigate with navintems for react bootstrap without refreshing the whole page"
Claire
08 Sep 2017
1import { Route, RouteHandler, Link } from 'react-router';
2import AuthService from '../services/AuthService'
3import { Button, Nav, Navbar, NavDropdown, MenuItem, NavItem } from 'react-bootstrap';
4import { LinkContainer } from 'react-router-bootstrap';
5
6/// In the render() method
7<Nav pullRight>
8  <LinkContainer to="/home">
9    <NavItem eventKey={1}>Home</NavItem>
10  </LinkContainer>
11  <LinkContainer to="/book">
12    <NavItem eventKey={2}>Book Inv</NavItem>
13  </LinkContainer>
14  <NavDropdown eventKey={3} title="Authorization" id="basic-nav-dropdown">
15    <LinkContainer to="/logout">
16      <MenuItem eventKey={3.1}>Logout</MenuItem>    
17    </LinkContainer>      
18  </NavDropdown>  
19</Nav>
20
Sofia
03 Jan 2020
1import { Link } from 'react-router-dom'
2
3<Nav.Link as={Link} to="/">