useSyncExternalStore is the answer https://dev.to/mynk-tmr/ditch-redux-build-a-global-store-in-40-lines-with-usesyncexternalstore-gp8 I don’t know about good example, try googling redux from scratch. Basically this advanced technique used by library stuff. The concept is you create store in a ref, in the context and that you register subscribers for that store…