**已关闭。**此问题需要debugging details。当前不接受答案。
编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
2天前关闭。
Improve this question
我正在开发一个react网站。如果我在我的主页上向下滚动,然后点击导航栏的任何链接,那么新的组件渲染也会滚动,而不是从滚动0渲染。如何解决这个问题?
我期待着这个问题的解决方案
2条答案
按热度按时间lf3rwulv1#
在App.js中尝试以下操作
5hcedyr02#
尝试以下代码从滚动0呈现组件: