react-reconciler: Update README.md (#13953)

Replaced 'var' with 'const'
This commit is contained in:
Marcelo Jorge Vieira
2018-11-05 13:55:23 -02:00
committed by Dan Abramov
parent 6c404d82aa
commit d34d1c3bae
+5 -5
View File
@@ -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.
@@ -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
},