I am using React 18, Typescript, NextJS 14, next-auth v5 ... In a client component, I get the user (session.data.user). Then I try to get that user from the home page. But, what I get the the previous user (or no user if the person wasn’t signed in). In order to get the user I must do a browser refresh. An example of this, I want to show the signed in username on the home screen ... I must do a manual browser refresh before the logged in user is available ... this is obviously not acceptable. I’m been trying multiple different things over the last 2 weeks with no success. Can anyone help? Here is an example of my code ... ```{!user ? ( <QuestionSection questionData={sampleQuestions} fireworksIndex={3} /> ) : ( <QuestionSection questionData={questions} fireworksIndex={63} /> )}''' In this case, the data is loaded correctly but a refresh is necessary to make it available. Help.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)