File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
# React Router Hash Link
2
2
3
- *** Note that this is for React Router v4, for v2/3 see [ this solution] ( https://github.com/rafrex/react-router-hash-link/tree/react-router-v2/3 ) .***
3
+ *** Note that this is for React Router v4/5 , for v2/3 see [ this solution] ( https://github.com/rafrex/react-router-hash-link/tree/react-router-v2/3 ) .***
4
4
5
5
[ Live Example] ( http://react-router-hash-link.rafrex.com/ )
6
6
@@ -20,7 +20,7 @@ $ npm install --save react-router-hash-link
20
20
...
21
21
import { HashLink as Link } from ' react-router-hash-link' ;
22
22
...
23
- // Use it just like a RRv4 <Link> (to can be a string or an object, see RRv4 api for details):
23
+ // Use it just like a RRv4/5 <Link> (to can be a string or an object, see RRv4/5 api for details):
24
24
< Link to= " /some/path#with-hash-fragment" > Link to Hash Fragment< / Link>
25
25
```
26
26
@@ -31,7 +31,7 @@ import { HashLink as Link } from 'react-router-hash-link';
31
31
...
32
32
import { NavHashLink as NavLink } from ' react-router-hash-link' ;
33
33
...
34
- // Use it just like a RRv4 <NavLink> (see RRv4 api for details):
34
+ // Use it just like a RRv4/5 <NavLink> (see RRv4/5 api for details):
35
35
< NavLink
36
36
to= " /some/path#with-hash-fragment"
37
37
activeClassName= " selected"
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-router-hash-link" ,
3
3
"version" : " 1.2.1" ,
4
- "description" : " Hash link scroll functionality for React Router v4" ,
4
+ "description" : " Hash link scroll functionality for React Router v4/5 " ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
7
7
"build" : " rm -rf lib && babel src -d lib --presets=env,react --plugins=transform-object-rest-spread" ,
30
30
},
31
31
"peerDependencies" : {
32
32
"react" : " >=15" ,
33
- "react-router-dom" : " ^4.1.1"
33
+ "react-router-dom" : " ^4.1.1 || ^5.0.0 "
34
34
},
35
35
"devDependencies" : {
36
36
"babel-cli" : " ^6.26.0" ,
You can’t perform that action at this time.
0 commit comments