React js scroll position is kept when a new page loads

i dont want it to be like that when i go to home from cart the scroll position on the cart is kept so when the home page loads the page starts at the bottom of the page i am using Link tags to travel around pages how can i fix that problem

Hi @oguzhanefe32!

You will receive more responses if you post a link to your project so people can see what is happening.

i didnt deployed it yet can you try to solve it like that its keeping the position of the scroll i mean when i scroll to footer when i load some other page like cart or about us page it starts at the footer too i dont want that i want it to be at the top everytime when a page loads up hope you can solve.

slider is adding # to the path so when i change the slider image the website scrolls to the top can i prevent it keeping the scroll position without scrolling to top.

I assume you are using empty links for the slider buttons? If you are not using the links as links they really shouldn’t be links. You can use button elements instead which is also more accessibility/keyboard navigation friendly.

Edit: Also, just to reiterate this point again.

Maybe this is what you want