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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -