Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/react-reconciler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ This is an experimental package for creating custom React renderers.
## API

```js
var Reconciler = require('react-reconciler');
const Reconciler = require('react-reconciler');

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

var MyRenderer = Reconciler(HostConfig);
const MyRenderer = Reconciler(HostConfig);

var RendererPublicAPI = {
const RendererPublicAPI = {
render(element, container, callback) {
// Call MyRenderer.updateContainer() to schedule changes on the roots.
// See ReactDOM, React Native, or React ART for practical examples.
Expand All @@ -33,7 +33,7 @@ module.exports = RendererPublicAPI;
A "host config" is an object that you need to provide, and that describes how to make something happen in the "host" environment (e.g. DOM, canvas, console, or whatever your rendering target is). It looks like this:

```js
var HostConfig = {
const HostConfig = {
createInstance(type, props) {
// e.g. DOM renderer returns a DOM node
},
Expand Down