react-router-bootstrap

Integration between React Router and React-Bootstrap

  • Owner: react-bootstrap/react-router-bootstrap
  • Platform:
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

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

Contributing

See CONTRIBUTING.

Main metrics

Overview
Name With Ownerreact-bootstrap/react-router-bootstrap
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:Apache License 2.0
所有者活动
Created At2014-08-05 11:56:46
Pushed At2025-06-06 21:25:31
Last Commit At2024-06-27 16:28:44
Release Count69
Last Release Namev0.26.3 (Posted on 2024-06-27 16:28:44)
First Release Namev0.0.1 (Posted on 2014-08-05 06:32:08)
用户参与
Stargazers Count1.7k
Watchers Count35
Fork Count163
Commits Count365
Has Issues Enabled
Issues Count177
Issue Open Count16
Pull Requests Count101
Pull Requests Open Count13
Pull Requests Close Count37
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private