dillon1000/react
Commit
Browse files Inject the update queue into classes
This decouples the stateful imperative API from the class creation. Instead, they get injected into the class from the renderer. Stateful modules should always be injected. As a convenience, just like props/context/refs, we set it up after construction using mutation. That way it is optional to pass it along the super call constructor chain.
Changed paths4 files
First-parent comparisonsrc/isomorphic/classic/class/ReactClass.js ModifiedM src/isomorphic/modern/class/ReactComponent.js ModifiedA src/isomorphic/modern/class/ReactNoopUpdateQueue.js AddedM src/renderers/shared/reconciler/ReactCompositeComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…