React.js: Stop render from scrolling to top of page

后端 未结 4 1458
眼角桃花
眼角桃花 2020-12-10 10:27

Every time you perform a render in React.js, the UI scrolls to the top of the page.

JSFiddle: http://jsfiddle.net/bengrunfeld/dcfy5xrd/

Any nifty or rea

4条回答
  •  旧巷少年郎
    2020-12-10 10:52

    @floydophone answered this one on Twitter.

    https://twitter.com/floydophone/status/608129119025561600

    @bengrunfeld @reactjs you forgot preventDefault() on your link handlers

提交回复
热议问题