Hi, i tried to make this cool effect with React https://codepen.io/BrianCross/pen/PoWapLP and this is what i did: https://codesandbox.io/s/lingering-rain-03x71q?file=/src/components/Navbar.js The thing is that i want to jump into a section when i click any navbar link but as far as i know i cant use any states and when i use refs i get undefined.
I tried to copy and paste slideIn function into any onClick navlinks but it didint work, it breaks the whole app.
How can i achive this? Hope it was understood. Thanks