localStorage is external mutable state that
#react doesn't track, which is exactly what
useSyncExternalStore is built for. Subscribe
through it and you get the three things a hand-rolled useState +
useEffect version usually drops: a server render that matches the
client's first paint, updates when another tab writes, and updates
when another instance of the hook on the same page writes.
@itsnas editor.tsx
codeeditor.tsx
main
Nas (@itsnas)
main
Nas (@itsnas)