React-Router same-page anchors with browserHistory -
using react-router
browserhistory
, how can create same-page link item on page?
in 1 component:
<link to='/coolroute#coolthing'>cool thing</link>
in another:
render () { return ( <div id='coolthing'></div> ); }
when click link browser url changes properly, nothing happens (i expect scroll up/down page element.
i know id present on page because doing document.getelementbyid('coolthing')
works fine.
Comments
Post a Comment