Nits
Sebastian Markbage committed
Jun 30, 2016 at 15:55 UTC
e60fb7eca017b335f8456986a90727beea80e99b
3 files changed
+2
-10
src/renderers/dom/fiber/ReactDOMFiber.js
-7
@@ -10,13 +10,6 @@
10
* @flow
11
*/
12
13
-/**
14
- * This is a renderer of React that doesn't have a render target output.
15
- * It is useful to demonstrate the internals of the reconciler in isolation
16
- * and for testing semantics of reconciliation separate from the host
17
- * environment.
18
- */
19
-
13
'use strict';
14
15
import type { HostChildren } from 'ReactFiberReconciler';
src/renderers/shared/fiber/ReactFiberCommitWork.js
+1
-2
@@ -46,11 +46,10 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>) {
46
if (finishedWork.stateNode == null || !finishedWork.alternate) {
47
throw new Error('This should only be done during updates.');
48
}
49
+ // Commit the work prepared earlier.
50
const child = (finishedWork.child : ?Fiber);
51
const children = (child && !child.sibling) ? (child.output : ?Fiber | I) : child;
52
const newProps = finishedWork.memoizedProps;
52
- // If we have an alternate, that means this is an update and we need to
53
- // schedule a side-effect to do the updates.
53
const current = finishedWork.alternate;
54
const oldProps = current.memoizedProps;
55
const instance : I = finishedWork.stateNode;
src/renderers/shared/fiber/ReactFiberCompleteWork.js
+1
-1
@@ -143,7 +143,7 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>) {
143
return null;
144
case HostComponent:
145
console.log('/host component', workInProgress.type);
146
- const child = (workInProgress.child : ?Fiber);
146
+ const child = workInProgress.child;
147
const children = (child && !child.sibling) ? (child.output : ?Fiber | I) : child;
148
const newProps = workInProgress.pendingProps;
149
workInProgress.memoizedProps = newProps;