How do I force a page reload on Hooks state change?
I'm using react hooks and need to do a page refresh on state change. I tried using window.location.reload() but this doesn't result in a proper refresh. const responseGoogle = async googleData => { await userLogin(googleData); setLoggedIn(true); window.location.reload() }; Only a manual F5 refresh does the job! Is there anything that's like a full refresh in React? Any help is much appreciated.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.