actual-react-router-bootstrap

1.0.0 • Public • Published

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={{ pathname: '/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

Note: Releases from v0.20.0 onward only support React Router v2.x. For React Router 1.x support, use v0.19.3 or earlier.

npm install react-router-bootstrap

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

npm install react-router react-bootstrap

Contributing

See CONTRIBUTING.

Package Sidebar

Install

npm i actual-react-router-bootstrap

Weekly Downloads

3

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • berkeleytrue