SpinTheMic
Pro

Interview practice question

Syncing logout and cart state across browser tabs in a React app

Frontend Engineering · React · Experienced

Users open your app in several tabs, and changes in one tab, like logging out, aren't reflected in others. How would you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • BroadcastChannel or storage events.
  • Sync auth state, preferences, cart.
  • Refetch server data on focus.
  • Handle conflicts.
  • Libraries support cross-tab sync.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics