react/packages/react-reconciler
Sophie Alpert 2a4d2ca7fc
Set owner correctly inside forwardRef and context consumer (#12777)
Previously, _owner would be null if you create an element inside forwardRef or inside a context consumer. This is used by ReactNativeFiberInspector when traversing the hierarchy and also to give more info in some warning texts. This also means you'll now correctly get a warning if you call setState inside one of these.

Test Plan: Tim tried it in the RN inspector.
2018-05-14 10:07:31 -07:00
..
npm Expose persistent reconciler to custom renderers (#12156) 2018-02-05 16:56:21 +00:00
src Set owner correctly inside forwardRef and context consumer (#12777) 2018-05-14 10:07:31 -07:00
README.md Fix renderer example links in README of `react-reconciler` (#11312) 2017-10-21 15:13:54 +01:00
index.js react-reconciler: convert vars into let/const (#11729) 2017-11-30 23:59:05 +00:00
package.json Updating package versions for release 16.3.2 2018-04-16 16:14:28 +01:00
persistent.js Expose persistent reconciler to custom renderers (#12156) 2018-02-05 16:56:21 +00:00
reflection.js Move ReactFiberTreeReflection to react-reconciler/reflection (#11683) 2017-11-28 16:57:22 +00:00

README.md

react-reconciler

This is an experimental package for creating custom React renderers.

Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.

Use it at your own risk.

API

var Reconciler = require('react-reconciler');

var ReconcilerConfig = {
  // You'll need to implement some methods here.
  // See below for more information and examples.
};

var MyRenderer = Reconciler(ReconcilerConfig);

var RendererPublicAPI = {
  render(element, container, callback) {
    // Call MyRenderer.updateContainer() to schedule changes on the roots.
    // See ReactDOM, React Native, or React ART for practical examples.
  }
};

module.exports = RendererPublicAPI;

Practical Examples

If these links break please file an issue and well fix them. They intentionally link to the latest versions since the API is still evolving.

This third-party tutorial is relatively up-to-date and may be helpful.