Create separate context providing components for each state

Merged
MA
1mo ago
+139-25

The generated StateProvider currently owns every substate reducer, so each delta re-renders that combined provider and recreates the provider elements for all substates. Give each substate its own reducer and provider so a delta only re-renders the providers it touches. Consumer updates continue to depend on their context values.

Dispatchers register into a stable shared registry during the layout phase, before the event loop connects the WebSocket. DispatchProvider's memo depends only on children, since the registry ref has a stable identity.

Validation: 282 compiler tests, all eight router browser cases across development and production modes, and all pre-commit hooks pass. The new browser case extends the existing router app: its initial on-load event updates two sibling substates, and the test verifies both rendered values plus a single received delta containing both updates. It replaces the source-string test that did not establish runtime ordering.