1
- # react-router-bootstrap [ ![ Travis ] [ build-badge ]] [ build ] [ ![ npm] [ npm-badge ]] [ npm ]
2
- Integration between [ React Router] v4 and [ React Bootstrap] .
1
+ # react-router-bootstrap [ ![ npm] [ npm-badge ]] [ npm ]
2
+ Integration between [ React Router] v6 and [ React Bootstrap] .
3
3
4
4
## Installation
5
5
6
- For React Router v4 :
6
+ For React Router v6 :
7
7
``` sh
8
8
npm install -S react-router-bootstrap
9
9
```
10
10
11
+ For React Router v4 or v5 (see [ rr-v4] branch):
12
+ ``` sh
13
+ npm install -S react-router-bootstrap@rr-v4
14
+ ```
15
+
11
16
For React Router v3 or lower (see [ rr-v3] branch):
12
17
``` sh
13
18
npm install -S react-router-bootstrap@rr-v3
@@ -19,10 +24,6 @@ Wrap your React Bootstrap element in a `<LinkContainer>` to make it behave like
19
24
20
25
` <LinkContainer> ` accepts same parameters as React Router's [ ` <NavLink> ` ]
21
26
22
- Please note that by default React Router will match any location that contains path specified in ` to ` prop.
23
- To make ` <LinkContainer> ` to match the location exactly, set ` exact ` prop to ` true ` or use ` <IndexLinkContainer> `
24
- instead.
25
-
26
27
## Example
27
28
28
29
Following plain React Bootstrap component
@@ -41,14 +42,12 @@ import { LinkContainer } from 'react-router-bootstrap'
41
42
42
43
See [ CONTRIBUTING] ( CONTRIBUTING.md ) .
43
44
44
- [ React Router ] : https://github.com/reactjs /react-router
45
+ [ React Router ] : https://github.com/remix-run /react-router
45
46
[ React Bootstrap ] : https://github.com/react-bootstrap/react-bootstrap
46
47
47
- [ build-badge ] : https://travis-ci.org/react-bootstrap/react-router-bootstrap.svg?branch=master
48
- [ build ] : https://travis-ci.org/react-bootstrap/react-router-bootstrap
49
-
50
48
[ npm-badge ] : https://badge.fury.io/js/react-router-bootstrap.svg
51
49
[ npm ] : http://badge.fury.io/js/react-router-bootstrap
52
50
53
51
[ rr-v3 ] : https://github.com/react-bootstrap/react-router-bootstrap/tree/rr-v3
52
+ [ rr-v4 ] : https://github.com/react-bootstrap/react-router-bootstrap/tree/rr-v4
54
53
[ `<NavLink>` ] : https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/api/NavLink.md
0 commit comments