Relative Content

Tag Archive for reactjsnavigationreact-context

Context keeps resetting when I switch pages in React JS

Im building a React JS with Typescript web application with Context to store the user details. I have implemented the Google SSO and thereafter Im setting the user object in the context. In the first try when I complete the sign in process and navigate to home, the context values are displayed correctly, but when i click on any of the options in the menu bar and navigate to a different page the context resets to the default value.