u/ASH49

▲ 1 r/developersIndia+1 crossposts

Had two tabs open in my app and noticed something annoying:

I logged out in one tab, but the other tab still showed me as logged in.

Built a small hook to fix it:

- syncs state across tabs instantly

- no refresh needed

Would love feedback if this is useful or if there's a better way to handle this.

npm: https://www.npmjs.com/package/react-tab-sync

github: https://github.com/enigma49/react-tab-sync

https://reddit.com/link/1sxbr79/video/j402cvadxrxg1/player

reddit.com
u/ASH49 — 16 days ago