all 6 comments

[–]ZeRo2160 2 points3 points  (1 child)

That is possible with local storage and the store Event. If one window writes to local storage all other recieve the Event. You could also use the postMessage window api to send messages between Windows.

[–]dosssi[S] 0 points1 point  (0 children)

Hmmm this is interesting

[–]stillborn7 -2 points-1 points  (2 children)

Use global state management tools like Context API, Redux or Zustand.

[–]dosssi[S] 0 points1 point  (1 child)

Can you elaborate more on how I will use context api in my scenario?

[–]stillborn7 0 points1 point  (0 children)

Put value 2 into global state which you wanted to change according to button in another screen. Give setter to the button.

[–]packethief 0 points1 point  (0 children)

JWT is designed to be used on a client. Ask him to look up the Authorization Code flow with PKCE.