Cleanup after #8353 (#8403)
Ben Alpert committed
Nov 23, 2016 at 14:43 UTC
53cdc4b288cf4a8039688fa767d52ca5e239be9b
3 files changed
+2
-18
src/renderers/dom/stack/client/__tests__/ReactDOM-test.js
+2
-3
@@ -14,7 +14,6 @@
14
var React = require('React');
15
var ReactDOM = require('ReactDOM');
16
var ReactTestUtils = require('ReactTestUtils');
17
-var div = React.createFactory('div');
17
18
describe('ReactDOM', () => {
19
// TODO: uncomment this test once we can run in phantom, which
@@ -54,7 +53,7 @@ describe('ReactDOM', () => {
53
54
it('should allow children to be passed as an argument', () => {
55
var argDiv = ReactTestUtils.renderIntoDocument(
57
- div(null, 'child')
56
+ React.DOM.div(null, 'child')
57
);
58
var argNode = ReactDOM.findDOMNode(argDiv);
59
expect(argNode.innerHTML).toBe('child');
@@ -62,7 +61,7 @@ describe('ReactDOM', () => {
61
62
it('should overwrite props.children with children argument', () => {
63
var conflictDiv = ReactTestUtils.renderIntoDocument(
65
- div({children: 'fakechild'}, 'child')
64
+ React.DOM.div({children: 'fakechild'}, 'child')
65
);
66
var conflictNode = ReactDOM.findDOMNode(conflictDiv);
67
expect(conflictNode.innerHTML).toBe('child');
src/renderers/noop/ReactNoop.js
-11
@@ -157,22 +157,13 @@ var NoopRenderer = ReactFiberReconciler({
157
},
158
159
prepareForCommit() : void {
160
- if (isCommitting) {
161
- throw new Error('Double prepare before commit');
162
- }
163
- isCommitting = true;
160
},
161
162
resetAfterCommit() : void {
167
- if (!isCommitting) {
168
- throw new Error('Double reset after commit');
169
- }
170
- isCommitting = false;
163
},
164
165
});
166
175
-var isCommitting = false;
167
var rootContainers = new Map();
168
var roots = new Map();
169
var DEFAULT_ROOT_ID = '<default>';
@@ -270,8 +261,6 @@ var ReactNoop = {
261
262
syncUpdates: NoopRenderer.syncUpdates,
263
273
- isCommitting: () => isCommitting,
274
-
264
// Logs the current state of the tree.
265
dumpTree(rootID : string = DEFAULT_ROOT_ID) {
266
const root = roots.get(rootID);
src/renderers/shared/fiber/ReactFiberScheduler.js
-4
@@ -88,10 +88,6 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {
88
// Need this to prevent recursion while in a Task loop.
89
let isPerformingTaskWork : boolean = false;
90
91
- // We'll only prepare/reset on the outermost commit even when a setState
92
- // callback causes another synchronous rerender
93
- let isCommitting : boolean = false;
94
-
91
// The next work in progress fiber that we're currently working on.
92
let nextUnitOfWork : ?Fiber = null;
93
let nextPriorityLevel : PriorityLevel = NoWork;