Here's an idea:
A front-end architecture for React apps with simple decentralized stores and explicit rendering control.
As an experiment (worked out together with Gemini AI), this should be a practical and very performant realization of the Functional Core, Imperative Shell (FCIS) architecture for a TypeScript front-end in React:
- We retain explicit control over when and if React should render. (Akin to Immediate Mode Rendering. But strictly speaking more like a hybrid: it features an Immediate-mode API (developer mental model) driving a Retained-mode rendering runtime implementation (React retaines the Virtual DOM tree). But importantly: React does not retain and control our State, so our State/Store is independent of the rendering loop, mounting/unmounting, (hard) page refreshes, etc.). By