🍙 A minimal implementation of react-dom using react-reconciler
react-tiny-domis a minimal implementation of react-dom as custom renderer using React 16 official Renderer API.
The purpose of this project is to show the meaning of each method of the
ReconcilerConfigpassed to react-reconciler, by using a practical yet familiar environment: the browser DOM.
The following features of
react-domare not supported yet but I'll probably add them:
Any other feature which doesn't help explaining the
Renderer API, like
dangerouslySetInnerHTML, won't be supported on purpose, to keep the source code minimal and focused on simplicity.
npm install npm start # Runs the example using react-tiny-dom
By default the demo logs most method calls of the Renderer, but you can pass a list of method names to exclude in the second parameter of
debugMethods, when passing the
const TinyDOMRenderer = Reconciler( debugMethods(hostConfig, ['now', 'getChildHostContext', 'shouldSetTextContent']) );
Reconcilerwill completely disable any method log.