Skip to content

Commit 97a4243

Browse files
react and react-reconciler packages upgraded
1 parent 914c3db commit 97a4243

File tree

3 files changed

+23
-34
lines changed

3 files changed

+23
-34
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
"dependencies": {
1010
"fbjs": "^0.8.16",
1111
"officegen": "^0.4.5",
12-
"react": "^16.0.0",
13-
"react-reconciler": "^0.2.0"
12+
"react": "^16.2.0",
13+
"react-reconciler": "^0.7.0"
1414
},
1515
"devDependencies": {
1616
"babel-cli": "^6.26.0",
1717
"babel-core": "^6.26.0",
18-
"babel-preset-env": "^1.6.0",
18+
"babel-preset-env": "^1.6.1",
1919
"babel-preset-react": "^6.24.1",
2020
"babel-preset-stage-0": "^6.24.1",
2121
"jest": "^21.2.1"

part-one.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Let's get started!
1212
We will first install the dependencies.
1313

1414
```
15-
npm install react-reconciler@0.2.0 fbjs@0.8.16
15+
npm install react-reconciler@0.7.0 fbjs@0.8.16
1616
```
1717

1818
Let's import the `Reconciler` from `react-reconciler` and also the other modules.
@@ -103,27 +103,27 @@ const WordRenderer = Reconciler({
103103
parentInstance.document = child;
104104
}
105105
},
106-
106+
107107
removeChild(parentInstance, child) {
108108
parentInstance.removeChild(child);
109109
},
110110

111111
removeChildFromContainer(parentInstance, child) {
112112
parentInstance.removeChild(child);
113113
},
114-
114+
115115
insertBefore(parentInstance, child, beforeChild) {
116116
// noob
117117
},
118-
118+
119119
commitUpdate(instance, updatePayload, type, oldProps, newProps) {
120120
// noop
121121
},
122-
122+
123123
commitMount(instance, updatePayload, type, oldProps, newProps) {
124124
// noop
125125
},
126-
126+
127127
commitTextUpdate(textInstance, oldText, newText) {
128128
textInstance.children = newText;
129129
},
@@ -141,9 +141,9 @@ Example - Let's say we render,
141141

142142
```js
143143
<Text>Hello World</Text>
144-
```
144+
```
145145

146-
`createInstance` will then return the information about the `type` of an element (' TEXT '), props ( { children: 'Hello World' } ), and the root instance (`WordDocument`).
146+
`createInstance` will then return the information about the `type` of an element (' TEXT '), props ( { children: 'Hello World' } ), and the root instance (`WordDocument`).
147147

148148
**Fiber**
149149

@@ -183,11 +183,11 @@ A fiber is work on a component that needs to be done or was done. Atmost, a comp
183183

184184
**`appendInitialChild`**
185185

186-
It appends the children. If children are wrapped inside a parent component (eg: `Document`), then we will add all the children to it else we
186+
It appends the children. If children are wrapped inside a parent component (eg: `Document`), then we will add all the children to it else we
187187
will create a property called `document` on a parent node and append all the children to it. This will be helpful when we will parse the input component
188188
and make a call to the render method of our component.
189189

190-
Example -
190+
Example -
191191

192192
```js
193193
const data = document.render(); // returns the output
@@ -207,7 +207,7 @@ Renderer mounts the host component but may schedule some work to done after like
207207

208208
**`hostContext`**
209209

210-
Host context is an internal object which our renderer may use based on the current location in the tree. In DOM, this object
210+
Host context is an internal object which our renderer may use based on the current location in the tree. In DOM, this object
211211
is required to make correct calls for example to create an element in html or in MathMl based on current context.
212212

213213
**`getPublicInstance`**
@@ -256,8 +256,6 @@ Creates an instance of a text node.
256256

257257
You can also inject your renderer into react-devtools to debug the host components of your environment. Earlier, it wasn't possible for third party renderers but now using the return value of `reconciler` instance, it is possible to inject the renderer into react-devtools.
258258

259-
> Note - This wasn't supported in `react-reconciler` version 0.2.0. So you'll need to update it to the current beta version 0.3.0-beta.1
260-
261259
**Usage**
262260

263261
Install standalone app for react-devtools

yarn.lock

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,9 @@ babel-polyfill@^6.26.0:
766766
core-js "^2.5.0"
767767
regenerator-runtime "^0.10.5"
768768

769-
babel-preset-env@^1.6.0:
770-
version "1.6.0"
771-
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4"
769+
babel-preset-env@^1.6.1:
770+
version "1.6.1"
771+
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
772772
dependencies:
773773
babel-plugin-check-es2015-constants "^6.22.0"
774774
babel-plugin-syntax-trailing-function-commas "^6.22.0"
@@ -2625,27 +2625,18 @@ rc@^1.1.7:
26252625
minimist "^1.2.0"
26262626
strip-json-comments "~2.0.1"
26272627

2628-
react-dom@^16.0.0:
2629-
version "16.0.0"
2630-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58"
2631-
dependencies:
2632-
fbjs "^0.8.16"
2633-
loose-envify "^1.1.0"
2634-
object-assign "^4.1.1"
2635-
prop-types "^15.6.0"
2636-
2637-
react-reconciler@^0.2.0:
2638-
version "0.2.0"
2639-
resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.2.0.tgz#59407c3e868211a7a6218070a55dfbc9c93b2243"
2628+
react-reconciler@^0.7.0:
2629+
version "0.7.0"
2630+
resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.7.0.tgz#9614894103e5f138deeeb5eabaf3ee80eb1d026d"
26402631
dependencies:
26412632
fbjs "^0.8.16"
26422633
loose-envify "^1.1.0"
26432634
object-assign "^4.1.1"
26442635
prop-types "^15.6.0"
26452636

2646-
react@^16.0.0:
2647-
version "16.0.0"
2648-
resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d"
2637+
react@^16.2.0:
2638+
version "16.2.0"
2639+
resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba"
26492640
dependencies:
26502641
fbjs "^0.8.16"
26512642
loose-envify "^1.1.0"

0 commit comments

Comments
 (0)