【发布时间】:2018-08-02 05:10:14
【问题描述】:
单击按钮时,我需要转到页面上的特定行。如何使用 react-router 来完成。我有:
<Grid xs={3}>
<Button>heading</Button>
<Button>Heading2</Button>
</Grid>
<Grid xs={3}>
<h1>heading</h1>
<p>Paragraph</p>
<h2>Heading2</h2>
<p>Paragraph2</p>
</Grid>
当点击标题按钮时,它应该跳转到第二个网格中的相关位置。怎么做。我也提到了How to use react-router to jump to specific location in the page。
【问题讨论】:
-
我已经更新了我的答案。检查一下
标签: reactjs react-router page-jump