react-router-bootstrap
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-router-bootstrap package

0.26.2 • Public • Published

react-router-bootstrap npm

Integration between React Router v6 and React Bootstrap.

Installation

For React Router v6:

npm install -S react-router-bootstrap

For React Router v4 or v5 (see rr-v4 branch):

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

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>

Example

Following plain React Bootstrap component

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

becomes

import { LinkContainer } from 'react-router-bootstrap'
<LinkContainer to="/foo/bar">
  <Button>Foo</Button>
</LinkContainer>

Contributing

See CONTRIBUTING.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i react-router-bootstrap

    Weekly Downloads

    71,243

    Version

    0.26.2

    License

    Apache-2.0

    Unpacked Size

    89.3 kB

    Total Files

    8

    Last publish

    Collaborators

    • monastic.panic
    • taion
    • kytsang
    • idolize
    • vespakoen
    • v6
    • mtscout6