Skip to content

AMD modules and browser globals of react-router and react-bootstrap compatible components

License

Notifications You must be signed in to change notification settings

react-bootstrap/react-router-bootstrap-bower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-router-bootstrap Travis npm

Integration between React Router v4 and React Bootstrap.

Installation

For React Router v4:

npm install -S react-router-bootstrap

For React Router v3 or lower (see rr-v3 branch):

npm install -S react-router-bootstrap@rr-v3

Usage

Wrap your React Bootstrap element in a <LinkContainer> to make it behave like a React Router <Link>

<LinkContainer> accepts same parameters as React Router's <NavLink>

Please note that by default React Router will match any location that contains path specified in to prop. To make <LinkContainer> to match the location exactly, set exact prop to true or use <IndexLinkContainer> instead.

Example

Following plain React Bootstrap component

<Button href="/foo/bar">Foo</Button>

becomes

<LinkContainer to="/foo/bar">
  <Button>Foo</Button>
</LinkContainer>

Contributing

See CONTRIBUTING.

About

AMD modules and browser globals of react-router and react-bootstrap compatible components

Resources

License

Stars

Watchers

Forks

Packages

No packages published