Skip to content
Integration between React Router and React-Bootstrap
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
scripts
src
tests
.babelrc
.eslintrc
.gitignore
.travis.yml Update Travis config
CHANGELOG.md
CONTRIBUTING.md [changed] Replace everything with LinkContainer
README.md
bower.template.json
karma.conf.js
package.json
webpack.config.babel.js
webpack.test.config.babel.js
webpack.visual.config.babel.js

README.md

react-router-bootstrap

Integration between React Router and React-Bootstrap.

Build Status npm version

Usage

Wrap your React-Bootstrap element in a LinkContainer to make it behave like a React Router Link:

<LinkContainer to="/foo" query={{bar: "baz"}}>
  <Button>Foo</Button>
</LinkContainer>

To disable the element and the link, set the disabled prop on the LinkContainer. For the equivalent of IndexLink, use IndexLinkContainer.

As with React Router's Link, returning false from an onClick handler on LinkContainer will prevent the transition. However, this behavior will not apply to any onClick on the child, which instead will have to call event.preventDefault() explicitly to prevent the transition.

Installation

npm install react-router-bootstrap

You will also want to have React Router and React-Bootstrap.

npm install react-router@latest react-bootstrap

Contributing

See CONTRIBUTING.

Something went wrong with that request. Please try again.