diff --git a/src/renderers/noop/ReactNoop.js b/src/renderers/noop/ReactNoop.js new file mode 100644 index 0000000000000..b1d63ec9d3ae3 --- /dev/null +++ b/src/renderers/noop/ReactNoop.js @@ -0,0 +1,84 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactNoop + * @flow + */ + +/** + * This is a renderer of React that doesn't have a render target output. + * It is useful to demonstrate the internals of the reconciler in isolation + * and for testing semantics of reconciliation separate from the host + * environment. + */ + +'use strict'; + +var ReactFiberReconciler = require('ReactFiberReconciler'); + +var scheduledHighPriCallback = null; +var scheduledLowPriCallback = null; + +var NoopRenderer = ReactFiberReconciler({ + + createHostInstance() { + + }, + scheduleHighPriCallback(callback) { + scheduledHighPriCallback = callback; + }, + scheduleLowPriCallback(callback) { + scheduledLowPriCallback = callback; + }, + +}); + +var ReactNoop = { + + render(element : ReactElement) { + + NoopRenderer.mountNewRoot(element); + + }, + + flushHighPri() { + var cb = scheduledHighPriCallback; + if (cb === null) { + return; + } + scheduledHighPriCallback = null; + cb(); + }, + + flushLowPri(timeout : number = Infinity) { + var cb = scheduledLowPriCallback; + if (cb === null) { + return; + } + scheduledLowPriCallback = null; + var timeRemaining = timeout; + cb({ + timeRemaining() { + // Simulate a fix amount of time progressing between each call. + timeRemaining -= 5; + if (timeRemaining < 0) { + timeRemaining = 0; + } + return timeRemaining; + }, + }); + }, + + flush() { + ReactNoop.flushHighPri(); + ReactNoop.flushLowPri(); + }, + +}; + +module.exports = ReactNoop; diff --git a/src/renderers/noop/__tests__/ReactNoop-test.js b/src/renderers/noop/__tests__/ReactNoop-test.js new file mode 100644 index 0000000000000..b71978e2cd75b --- /dev/null +++ b/src/renderers/noop/__tests__/ReactNoop-test.js @@ -0,0 +1,57 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @emails react-core + */ + +'use strict'; + +var React; +var ReactNoop; + +describe('ReactComponent', function() { + beforeEach(function() { + React = require('React'); + ReactNoop = require('ReactNoop'); + }); + + it('should render a simple component', function() { + + function Bar() { + return
Hello World
; + } + + function Foo() { + return ; + } + + ReactNoop.render(); + ReactNoop.flush(); + + }); + + it('should render a simple component, in steps if needed', function() { + + function Bar() { + return
Hello World
; + } + + function Foo() { + return ; + } + + ReactNoop.render(); + // console.log('Nothing done'); + ReactNoop.flushLowPri(7); + // console.log('Yield'); + ReactNoop.flushLowPri(50); + // console.log('Done'); + }); + + +}); diff --git a/src/renderers/shared/fiber/ReactFiber.js b/src/renderers/shared/fiber/ReactFiber.js new file mode 100644 index 0000000000000..9e99e8998c6ba --- /dev/null +++ b/src/renderers/shared/fiber/ReactFiber.js @@ -0,0 +1,59 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactFiber + * @flow + */ + +'use strict'; + +type StateNode = {}; +type EffectHandler = () => void; +type EffectTag = number; + +export type Fiber = { + + tag: number, + + parent: ?Fiber, + child: ?Fiber, + sibling: ?Fiber, + + input: ?Object, + output: ?Object, + + handler: EffectHandler, + handlerTag: EffectTag, + + hasPendingChanges: bool, + + stateNode: StateNode, + +}; + +module.exports = function(tag : number) : Fiber { + return { + + tag: tag, + + parent: null, + child: null, + sibling: null, + + input: null, + output: null, + + handler: function() {}, + handlerTag: 0, + + hasPendingChanges: true, + + stateNode: {}, + + }; +}; diff --git a/src/renderers/shared/fiber/ReactFiberFunctionalComponent.js b/src/renderers/shared/fiber/ReactFiberFunctionalComponent.js new file mode 100644 index 0000000000000..8c5ac48f8c06f --- /dev/null +++ b/src/renderers/shared/fiber/ReactFiberFunctionalComponent.js @@ -0,0 +1,45 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactFiberFunctionalComponent + * @flow + */ + +'use strict'; + +import type { Fiber } from 'ReactFiber'; +var createFiber = require('ReactFiber'); + +var ReactTypesOfWork = require('ReactTypesOfWork'); +var { + FunctionalComponent, +} = ReactTypesOfWork; + +exports.performWork = function(unitOfWork : Fiber) : ?Fiber { + var element = unitOfWork.input; + if (!element) { + throw new Error('Should be resolved by now'); + } + var fn = element.type; + var props = element.props; + // console.log('perform work on:', fn.name); + var nextElement = fn(props); + + if (typeof nextElement.type === 'function') { + return exports.createFiber(nextElement); + } + return null; +}; + +exports.createFiber = function(element : ReactElement) { + var fiber = createFiber( + FunctionalComponent + ); + fiber.input = element; + return fiber; +}; diff --git a/src/renderers/shared/fiber/ReactFiberReconciler.js b/src/renderers/shared/fiber/ReactFiberReconciler.js new file mode 100644 index 0000000000000..c367a14f23a5d --- /dev/null +++ b/src/renderers/shared/fiber/ReactFiberReconciler.js @@ -0,0 +1,109 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactFiberReconciler + * @flow + */ + +'use strict'; + +import type { Fiber } from 'ReactFiber'; +var ReactFiberFunctionalComponent = require('ReactFiberFunctionalComponent'); + +var ReactTypesOfWork = require('ReactTypesOfWork'); +var { + FunctionalComponent, + ClassComponent, + NativeComponent, +} = ReactTypesOfWork; + +type ReactHostElement = { + type: T, + props: P +}; + +type Deadline = { + timeRemaining : () => number +}; + +var timeHeuristicForUnitOfWork = 1; + +export type HostConfig = { + + createHostInstance(element : ReactHostElement) : I, + scheduleHighPriCallback(callback : () => void) : void, + scheduleLowPriCallback(callback : (deadline : Deadline) => void) : void + +}; + +type OpaqueID = {}; + +export type Reconciler = { + mountNewRoot(element : ReactElement) : OpaqueID; +}; + +module.exports = function(config : HostConfig) : Reconciler { + + // const scheduleHighPriCallback = config.scheduleHighPriCallback; + const scheduleLowPriCallback = config.scheduleLowPriCallback; + + let nextUnitOfWork : ?Fiber = null; + + function performUnitOfWork(unit : Fiber) : ?Fiber { + switch (unit.tag) { + case FunctionalComponent: + return ReactFiberFunctionalComponent.performWork(unit); + case ClassComponent: + break; + case NativeComponent: + break; + } + return null; + } + + function performLowPriWork(deadline : Deadline) { + while (nextUnitOfWork) { + if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) { + nextUnitOfWork = performUnitOfWork(nextUnitOfWork); + } else { + scheduleLowPriCallback(performLowPriWork); + break; + } + } + } + + function ensureLowPriIsScheduled() { + if (nextUnitOfWork) { + return; + } + scheduleLowPriCallback(performLowPriWork); + } + + /* + function performHighPriWork() { + // There is no such thing as high pri work yet. + } + + function ensureHighPriIsScheduled() { + scheduleHighPriCallback(performHighPriWork); + } + */ + + return { + + mountNewRoot(element : ReactElement) : OpaqueID { + + ensureLowPriIsScheduled(); + + nextUnitOfWork = ReactFiberFunctionalComponent.createFiber(element); + + return {}; + }, + + }; +}; diff --git a/src/renderers/shared/fiber/ReactStateNode.js b/src/renderers/shared/fiber/ReactStateNode.js new file mode 100644 index 0000000000000..c7ea45b3b4064 --- /dev/null +++ b/src/renderers/shared/fiber/ReactStateNode.js @@ -0,0 +1,23 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactStateNode + * @flow + */ + +'use strict'; + +type StateNode = { + next: ?{ [key: string]: StateNode }, +}; + +module.exports = function() : StateNode { + return { + next: null, + }; +}; diff --git a/src/renderers/shared/fiber/ReactTypesOfWork.js b/src/renderers/shared/fiber/ReactTypesOfWork.js new file mode 100644 index 0000000000000..bccd9614972bb --- /dev/null +++ b/src/renderers/shared/fiber/ReactTypesOfWork.js @@ -0,0 +1,21 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactTypesOfWork + * @flow + */ + +'use strict'; + +var TypesOfWork = { + FunctionalComponent: 1, + ClassComponent: 2, + NativeComponent: 3, +}; + +module.exports = TypesOfWork; diff --git a/src/renderers/shared/reconciler/shouldUpdateReactComponent.js b/src/renderers/shared/shared/shouldUpdateReactComponent.js similarity index 100% rename from src/renderers/shared/reconciler/shouldUpdateReactComponent.js rename to src/renderers/shared/shared/shouldUpdateReactComponent.js diff --git a/src/renderers/shared/event/EventConstants.js b/src/renderers/shared/stack/event/EventConstants.js similarity index 100% rename from src/renderers/shared/event/EventConstants.js rename to src/renderers/shared/stack/event/EventConstants.js diff --git a/src/renderers/shared/event/EventPluginHub.js b/src/renderers/shared/stack/event/EventPluginHub.js similarity index 100% rename from src/renderers/shared/event/EventPluginHub.js rename to src/renderers/shared/stack/event/EventPluginHub.js diff --git a/src/renderers/shared/event/EventPluginRegistry.js b/src/renderers/shared/stack/event/EventPluginRegistry.js similarity index 100% rename from src/renderers/shared/event/EventPluginRegistry.js rename to src/renderers/shared/stack/event/EventPluginRegistry.js diff --git a/src/renderers/shared/event/EventPluginUtils.js b/src/renderers/shared/stack/event/EventPluginUtils.js similarity index 100% rename from src/renderers/shared/event/EventPluginUtils.js rename to src/renderers/shared/stack/event/EventPluginUtils.js diff --git a/src/renderers/shared/event/EventPropagators.js b/src/renderers/shared/stack/event/EventPropagators.js similarity index 100% rename from src/renderers/shared/event/EventPropagators.js rename to src/renderers/shared/stack/event/EventPropagators.js diff --git a/src/renderers/shared/event/__tests__/EventPluginHub-test.js b/src/renderers/shared/stack/event/__tests__/EventPluginHub-test.js similarity index 100% rename from src/renderers/shared/event/__tests__/EventPluginHub-test.js rename to src/renderers/shared/stack/event/__tests__/EventPluginHub-test.js diff --git a/src/renderers/shared/event/__tests__/EventPluginRegistry-test.js b/src/renderers/shared/stack/event/__tests__/EventPluginRegistry-test.js similarity index 100% rename from src/renderers/shared/event/__tests__/EventPluginRegistry-test.js rename to src/renderers/shared/stack/event/__tests__/EventPluginRegistry-test.js diff --git a/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js b/src/renderers/shared/stack/event/eventPlugins/ResponderEventPlugin.js similarity index 100% rename from src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js rename to src/renderers/shared/stack/event/eventPlugins/ResponderEventPlugin.js diff --git a/src/renderers/shared/event/eventPlugins/ResponderSyntheticEvent.js b/src/renderers/shared/stack/event/eventPlugins/ResponderSyntheticEvent.js similarity index 100% rename from src/renderers/shared/event/eventPlugins/ResponderSyntheticEvent.js rename to src/renderers/shared/stack/event/eventPlugins/ResponderSyntheticEvent.js diff --git a/src/renderers/shared/event/eventPlugins/ResponderTouchHistoryStore.js b/src/renderers/shared/stack/event/eventPlugins/ResponderTouchHistoryStore.js similarity index 100% rename from src/renderers/shared/event/eventPlugins/ResponderTouchHistoryStore.js rename to src/renderers/shared/stack/event/eventPlugins/ResponderTouchHistoryStore.js diff --git a/src/renderers/shared/event/eventPlugins/TouchHistoryMath.js b/src/renderers/shared/stack/event/eventPlugins/TouchHistoryMath.js similarity index 100% rename from src/renderers/shared/event/eventPlugins/TouchHistoryMath.js rename to src/renderers/shared/stack/event/eventPlugins/TouchHistoryMath.js diff --git a/src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js b/src/renderers/shared/stack/event/eventPlugins/__tests__/ResponderEventPlugin-test.js similarity index 100% rename from src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js rename to src/renderers/shared/stack/event/eventPlugins/__tests__/ResponderEventPlugin-test.js diff --git a/src/renderers/shared/reconciler/ReactChildReconciler.js b/src/renderers/shared/stack/reconciler/ReactChildReconciler.js similarity index 100% rename from src/renderers/shared/reconciler/ReactChildReconciler.js rename to src/renderers/shared/stack/reconciler/ReactChildReconciler.js diff --git a/src/renderers/shared/reconciler/ReactComponentEnvironment.js b/src/renderers/shared/stack/reconciler/ReactComponentEnvironment.js similarity index 100% rename from src/renderers/shared/reconciler/ReactComponentEnvironment.js rename to src/renderers/shared/stack/reconciler/ReactComponentEnvironment.js diff --git a/src/renderers/shared/reconciler/ReactCompositeComponent.js b/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js similarity index 100% rename from src/renderers/shared/reconciler/ReactCompositeComponent.js rename to src/renderers/shared/stack/reconciler/ReactCompositeComponent.js diff --git a/src/renderers/shared/reconciler/ReactDefaultBatchingStrategy.js b/src/renderers/shared/stack/reconciler/ReactDefaultBatchingStrategy.js similarity index 100% rename from src/renderers/shared/reconciler/ReactDefaultBatchingStrategy.js rename to src/renderers/shared/stack/reconciler/ReactDefaultBatchingStrategy.js diff --git a/src/renderers/shared/reconciler/ReactEmptyComponent.js b/src/renderers/shared/stack/reconciler/ReactEmptyComponent.js similarity index 100% rename from src/renderers/shared/reconciler/ReactEmptyComponent.js rename to src/renderers/shared/stack/reconciler/ReactEmptyComponent.js diff --git a/src/renderers/shared/reconciler/ReactEventEmitterMixin.js b/src/renderers/shared/stack/reconciler/ReactEventEmitterMixin.js similarity index 100% rename from src/renderers/shared/reconciler/ReactEventEmitterMixin.js rename to src/renderers/shared/stack/reconciler/ReactEventEmitterMixin.js diff --git a/src/renderers/shared/reconciler/ReactInstanceHandles.js b/src/renderers/shared/stack/reconciler/ReactInstanceHandles.js similarity index 100% rename from src/renderers/shared/reconciler/ReactInstanceHandles.js rename to src/renderers/shared/stack/reconciler/ReactInstanceHandles.js diff --git a/src/renderers/shared/reconciler/ReactInstanceMap.js b/src/renderers/shared/stack/reconciler/ReactInstanceMap.js similarity index 100% rename from src/renderers/shared/reconciler/ReactInstanceMap.js rename to src/renderers/shared/stack/reconciler/ReactInstanceMap.js diff --git a/src/renderers/shared/reconciler/ReactMultiChild.js b/src/renderers/shared/stack/reconciler/ReactMultiChild.js similarity index 100% rename from src/renderers/shared/reconciler/ReactMultiChild.js rename to src/renderers/shared/stack/reconciler/ReactMultiChild.js diff --git a/src/renderers/shared/reconciler/ReactMultiChildUpdateTypes.js b/src/renderers/shared/stack/reconciler/ReactMultiChildUpdateTypes.js similarity index 100% rename from src/renderers/shared/reconciler/ReactMultiChildUpdateTypes.js rename to src/renderers/shared/stack/reconciler/ReactMultiChildUpdateTypes.js diff --git a/src/renderers/shared/reconciler/ReactNativeComponent.js b/src/renderers/shared/stack/reconciler/ReactNativeComponent.js similarity index 100% rename from src/renderers/shared/reconciler/ReactNativeComponent.js rename to src/renderers/shared/stack/reconciler/ReactNativeComponent.js diff --git a/src/renderers/shared/reconciler/ReactOwner.js b/src/renderers/shared/stack/reconciler/ReactOwner.js similarity index 100% rename from src/renderers/shared/reconciler/ReactOwner.js rename to src/renderers/shared/stack/reconciler/ReactOwner.js diff --git a/src/renderers/shared/reconciler/ReactReconciler.js b/src/renderers/shared/stack/reconciler/ReactReconciler.js similarity index 100% rename from src/renderers/shared/reconciler/ReactReconciler.js rename to src/renderers/shared/stack/reconciler/ReactReconciler.js diff --git a/src/renderers/shared/reconciler/ReactRef.js b/src/renderers/shared/stack/reconciler/ReactRef.js similarity index 100% rename from src/renderers/shared/reconciler/ReactRef.js rename to src/renderers/shared/stack/reconciler/ReactRef.js diff --git a/src/renderers/shared/reconciler/ReactSimpleEmptyComponent.js b/src/renderers/shared/stack/reconciler/ReactSimpleEmptyComponent.js similarity index 100% rename from src/renderers/shared/reconciler/ReactSimpleEmptyComponent.js rename to src/renderers/shared/stack/reconciler/ReactSimpleEmptyComponent.js diff --git a/src/renderers/shared/reconciler/ReactStateSetters.js b/src/renderers/shared/stack/reconciler/ReactStateSetters.js similarity index 100% rename from src/renderers/shared/reconciler/ReactStateSetters.js rename to src/renderers/shared/stack/reconciler/ReactStateSetters.js diff --git a/src/renderers/shared/reconciler/ReactUpdateQueue.js b/src/renderers/shared/stack/reconciler/ReactUpdateQueue.js similarity index 100% rename from src/renderers/shared/reconciler/ReactUpdateQueue.js rename to src/renderers/shared/stack/reconciler/ReactUpdateQueue.js diff --git a/src/renderers/shared/reconciler/ReactUpdates.js b/src/renderers/shared/stack/reconciler/ReactUpdates.js similarity index 100% rename from src/renderers/shared/reconciler/ReactUpdates.js rename to src/renderers/shared/stack/reconciler/ReactUpdates.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactComponent-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactComponent-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactComponentLifeCycle-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactComponentLifeCycle-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactComponentLifeCycle-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactComponentLifeCycle-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponent-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponent-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentNestedState-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactCompositeComponentNestedState-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentNestedState-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactCompositeComponentState-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentState-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactCompositeComponentState-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentState-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactEmptyComponent-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactEmptyComponent-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactEmptyComponent-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactEmptyComponent-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactIdentity-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactIdentity-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactMockedComponent-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactMockedComponent-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactMockedComponent-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactMockedComponent-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactMultiChild-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactMultiChild-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactMultiChild-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactMultiChild-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildReconcile-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildReconcile-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactMultiChildText-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildText-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactMultiChildText-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildText-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactStateSetters-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactStateSetters-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactStateSetters-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactStateSetters-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactStatelessComponent-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactStatelessComponent-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactStatelessComponent-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactStatelessComponent-test.js diff --git a/src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js b/src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/ReactUpdates-test.js rename to src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js diff --git a/src/renderers/shared/reconciler/__tests__/refs-destruction-test.js b/src/renderers/shared/stack/reconciler/__tests__/refs-destruction-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/refs-destruction-test.js rename to src/renderers/shared/stack/reconciler/__tests__/refs-destruction-test.js diff --git a/src/renderers/shared/reconciler/__tests__/refs-test.js b/src/renderers/shared/stack/reconciler/__tests__/refs-test.js similarity index 100% rename from src/renderers/shared/reconciler/__tests__/refs-test.js rename to src/renderers/shared/stack/reconciler/__tests__/refs-test.js diff --git a/src/renderers/shared/reconciler/instantiateReactComponent.js b/src/renderers/shared/stack/reconciler/instantiateReactComponent.js similarity index 100% rename from src/renderers/shared/reconciler/instantiateReactComponent.js rename to src/renderers/shared/stack/reconciler/instantiateReactComponent.js