react-router-dom/Link wrapper to handle hash value
react-router-dom/Link
wrapper to handle hash value
$ npm install --save react-router-hashlink
import { HashLink } from 'react-router-hashlink';
...
<HashLink to="https://github.com/1000ch/react-router-hashlink#install">
Hello
</HashLink>
Property | Type | Default Value |
---|---|---|
to |
String or Object
|
- |
behavior | String |
auto |
delay | Number |
0 |
onClick | Function |
() => {} |
You can configuire scroll behavior via behavior
property applied to ScrollBehavior
option of scrollIntoView()
. You probably want to polyfill it with smooth scroll polyfill.