State Management · Senior · Question 47 of 75

How do you keep two browser tabs' client state in sync (e.g. logout in one tab)?

Explanation

Each tab is a separate JS realm with its own store. A message on logout lets other tabs clear their state; persist storage events can rehydrate Zustand. Server caches also refetch on focus.

Further reading

Problem with a question

State Management · Senior · question 47

Test yourself

Take the State Management · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz