Skip to content

Commit

Permalink
react-reconciler: Update README.md (facebook#13953)
Browse files Browse the repository at this point in the history
Replaced 'var' with 'const'
  • Loading branch information
marcelometal authored and jetoneza committed Jan 23, 2019
1 parent 62e4e14 commit b48a3ad
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit b48a3ad

Please sign in to comment.