0

I am learning react and I want to create a index at the top of the page to jump to text. So I have a bunch of very long text pages with sections. I want the top to have

section 1 section 2 section 3

and when you click one you jump down in the page to that section.

I tried to use link to with an id in the

. but does not do anything.

any help would be great. Thanks

ducati1212
  • 201
  • 2
  • 13
  • Try using anchors: https://stackoverflow.com/questions/40280369/use-anchors-with-react-router – K. Martin Sep 07 '20 at 15:33
  • You can find also this solution [React Hooks Scroll to Element](https://stackoverflow.com/questions/56420392/react-hooks-scroll-to-element/56421201) that can provide an experience where you click and scroll to an specific element. – Victor Barros Sep 07 '20 at 15:47

0 Answers0