Relative Content

Tag Archive for javascriptreactjsreact-hooksreact-reduxvite

My entire page reloads after changing a state in react

So I have a website with a global state that I created using redux. This holds a list of every window there is. I have seperate state for the windows itself to track it’s position and size on the screen. I used an effect to update the global state when the local state changes. However, when the state is changed, the entire website reloads. This normally wouldn’t be a problem but I have a loading screen that show up and fades out everytime you move a window. Why is this happening?