A factory function creates component instances with custom state, rendering, and behavior, avoiding a single application-wide state object and reducer collection. section 9.0
A component factory organizes creation around a few responsibilities:
- Create each component's state when the component is instantiated. section 9.4
- Provide a render function and methods, including updateState(), for changing state. section 9.4
- Patch the component's DOM subtree when its state changes instead of rerendering the entire application. section 9.0 section 9.4
- Bind render functions and event handlers explicitly so this refers to the component instance. section 9.4
A stateful component instance
Instead of passing global state, reducers, and a root component into createApp(), the newer architecture can receive only a root component. That component is created through a factory, owns its state, renders its view, and patches its DOM subtree after updateState() runs. section 9.0 section 9.4
Figure 9.2 The new version of the framework’s application instance requires only the root component.
Shows the architectural shift from an application requiring global state and reducers to one requiring only a root component. section 9.0










