@samitouri / QOS-React / commits / d34d1c3bae

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

Replaced 'var' with 'const'

Marcelo Jorge Vieira committed Nov 5, 2018 at 13:55 UTC d34d1c3baee307d03b2ab430fe4b4a4f1f2ef09e
1 file changed +5 -5
packages/react-reconciler/README.md
+5 -5
@@ -9,16 +9,16 @@ This is an experimental package for creating custom React renderers.
9 ## API
10
11 ```js
12 -var Reconciler = require('react-reconciler');
12 +const Reconciler = require('react-reconciler');
13
14 -var HostConfig = {
14 +const HostConfig = {
15 // You'll need to implement some methods here.
16 // See below for more information and examples.
17 };
18
19 -var MyRenderer = Reconciler(HostConfig);
19 +const MyRenderer = Reconciler(HostConfig);
20
21 -var RendererPublicAPI = {
21 +const RendererPublicAPI = {
22 render(element, container, callback) {
23 // Call MyRenderer.updateContainer() to schedule changes on the roots.
24 // See ReactDOM, React Native, or React ART for practical examples.
@@ -33,7 +33,7 @@ module.exports = RendererPublicAPI;
33 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:
34
35 ```js
36 -var HostConfig = {
36 +const HostConfig = {
37 createInstance(type, props) {
38 // e.g. DOM renderer returns a DOM node
39 },