Skip to content

Commit d34d1c3

Browse files
marcelometalgaearon
authored andcommitted
react-reconciler: Update README.md (#13953)
Replaced 'var' with 'const'
1 parent 6c404d8 commit d34d1c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/react-reconciler/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ This is an experimental package for creating custom React renderers.
99
## API
1010

1111
```js
12-
var Reconciler = require('react-reconciler');
12+
const Reconciler = require('react-reconciler');
1313

14-
var HostConfig = {
14+
const HostConfig = {
1515
// You'll need to implement some methods here.
1616
// See below for more information and examples.
1717
};
1818

19-
var MyRenderer = Reconciler(HostConfig);
19+
const MyRenderer = Reconciler(HostConfig);
2020

21-
var RendererPublicAPI = {
21+
const RendererPublicAPI = {
2222
render(element, container, callback) {
2323
// Call MyRenderer.updateContainer() to schedule changes on the roots.
2424
// See ReactDOM, React Native, or React ART for practical examples.
@@ -33,7 +33,7 @@ module.exports = RendererPublicAPI;
3333
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:
3434

3535
```js
36-
var HostConfig = {
36+
const HostConfig = {
3737
createInstance(type, props) {
3838
// e.g. DOM renderer returns a DOM node
3939
},

0 commit comments

Comments
 (0)