Skip to content

Commit

Permalink
Remove closures from the reconciler
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 17, 2018
1 parent 2780e02 commit 22e6ea3
Show file tree
Hide file tree
Showing 19 changed files with 716 additions and 536 deletions.
79 changes: 79 additions & 0 deletions packages/react-art/src/ReactARTHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ function applyTextProps(instance, props, prevProps = {}) {
}

export const scheduleDeferredCallback = ReactScheduler.scheduleWork;
export const cancelDeferredCallback = ReactScheduler.cancelScheduledWork;

export function shouldSetTextContent(type, props) {
return (
Expand Down Expand Up @@ -386,3 +387,81 @@ function applyTextProps(instance, props, prevProps = {}) {
export function commitUpdate(instance, updatePayload, type, oldProps, newProps) {
instance._applyProps(instance, newProps, oldProps);
}


export function cloneInstance() {
// not supported
}

export function createContainerChildSet() {
// not supported
}

export function appendChildToContainerChildSet() {
// not supported
}

export function finalizeContainerChildren() {
// not supported
}

export function replaceContainerChildren() {
// not supported
}


export function canHydrateInstance() {
// not supported
}

export function canHydrateTextInstance() {
// not supported
}

export function getNextHydratableSibling() {
// not supported
}

export function getFirstHydratableChild() {
// not supported
}

export function hydrateInstance() {
// not supported
}

export function hydrateTextInstance() {
// not supported
}

export function didNotMatchHydratedContainerTextInstance() {
// not supported
}

export function didNotMatchHydratedTextInstance() {
// not supported
}

export function didNotHydrateContainerInstance() {
// not supported
}

export function didNotHydrateInstance() {
// not supported
}

export function didNotFindHydratableContainerInstance() {
// not supported
}

export function didNotFindHydratableContainerTextInstance() {
// not supported
}

export function didNotFindHydratableInstance() {
// not supported
}

export function didNotFindHydratableTextInstance() {
// not supported
}
23 changes: 23 additions & 0 deletions packages/react-dom/src/client/ReactDOMHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,5 +561,28 @@ export function prepareUpdate(
}
}


export const scheduleDeferredCallback = ReactScheduler.scheduleWork;
export const cancelDeferredCallback = ReactScheduler.cancelScheduledWork;


export function cloneInstance() {
// not supported
}

export function createContainerChildSet() {
// not supported
}

export function appendChildToContainerChildSet() {
// not supported
}

export function finalizeContainerChildren() {
// not supported
}

export function replaceContainerChildren() {
// not supported
}

125 changes: 100 additions & 25 deletions packages/react-native-renderer/src/ReactFabricHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,49 +344,124 @@ export function appendInitialChild(
};
}

<<<<<<< HEAD
createContainerChildSet(container: Container): ChildSet {
return createChildSet(container);
},
=======
export function createContainerChildSet(container: Container): ChildSet {
return FabricUIManager.createChildSet(container);
return createChildSet(container);
}
>>>>>>> ES modules for host configs

export function appendChildToContainerChildSet(
childSet: ChildSet,
child: Instance | TextInstance,
): void {
<<<<<<< HEAD
appendChildToSet(childSet, child.node);
},
=======
FabricUIManager.appendChildToSet(childSet, child.node);
}
>>>>>>> ES modules for host configs

export function finalizeContainerChildren(
container: Container,
newChildren: ChildSet,
): void {
<<<<<<< HEAD
completeRoot(container, newChildren);
},
=======
FabricUIManager.completeRoot(container, newChildren);
}
>>>>>>> ES modules for host configs

export function replaceContainerChildren(
container: Container,
newChildren: ChildSet,
<<<<<<< HEAD
): void {},
},
};

export default ReactFabricHostConfig;
=======
): void {}
>>>>>>> ES modules for host configs


export function commitMount() {
// not supported
}

export function commitUpdate() {
// not supported
}

export function commitTextUpdate() {
// not supported
}

export function resetTextContent() {
// not supported
}

export function appendChild() {
// not supported
}

export function appendChildToContainer() {
// not supported
}

export function insertBefore() {
// not supported
}

export function insertInContainerBefore() {
// not supported
}

export function removeChild() {
// not supported
}

export function removeChildFromContainer() {
// not supported
}



export function canHydrateInstance() {
// not supported
}

export function canHydrateTextInstance() {
// not supported
}

export function getNextHydratableSibling() {
// not supported
}

export function getFirstHydratableChild() {
// not supported
}

export function hydrateInstance() {
// not supported
}

export function hydrateTextInstance() {
// not supported
}

export function didNotMatchHydratedContainerTextInstance() {
// not supported
}

export function didNotMatchHydratedTextInstance() {
// not supported
}

export function didNotHydrateContainerInstance() {
// not supported
}

export function didNotHydrateInstance() {
// not supported
}

export function didNotFindHydratableContainerInstance() {
// not supported
}

export function didNotFindHydratableContainerTextInstance() {
// not supported
}

export function didNotFindHydratableInstance() {
// not supported
}

export function didNotFindHydratableTextInstance() {
// not supported
}
77 changes: 77 additions & 0 deletions packages/react-native-renderer/src/ReactNativeHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,80 @@ function recursivelyUncacheFiberNode(node: Instance | TextInstance) {
export function resetTextContent(instance: Instance): void {
// Noop
}

export function cloneInstance() {
// not supported
}

export function createContainerChildSet() {
// not supported
}

export function appendChildToContainerChildSet() {
// not supported
}

export function finalizeContainerChildren() {
// not supported
}

export function replaceContainerChildren() {
// not supported
}


export function canHydrateInstance() {
// not supported
}

export function canHydrateTextInstance() {
// not supported
}

export function getNextHydratableSibling() {
// not supported
}

export function getFirstHydratableChild() {
// not supported
}

export function hydrateInstance() {
// not supported
}

export function hydrateTextInstance() {
// not supported
}

export function didNotMatchHydratedContainerTextInstance() {
// not supported
}

export function didNotMatchHydratedTextInstance() {
// not supported
}

export function didNotHydrateContainerInstance() {
// not supported
}

export function didNotHydrateInstance() {
// not supported
}

export function didNotFindHydratableContainerInstance() {
// not supported
}

export function didNotFindHydratableContainerTextInstance() {
// not supported
}

export function didNotFindHydratableInstance() {
// not supported
}

export function didNotFindHydratableTextInstance() {
// not supported
}
1 change: 0 additions & 1 deletion packages/react-native-renderer/src/ReactNativeRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import UIManager from 'UIManager';

import {getStackAddendumByWorkInProgressFiber} from 'shared/ReactFiberComponentTreeHook';

import * as ReactNativeHostConfig from './ReactNativeHostConfig';
import NativeMethodsMixin from './NativeMethodsMixin';
import ReactNativeComponent from './ReactNativeComponent';
import * as ReactNativeComponentTree from './ReactNativeComponentTree';
Expand Down
Loading

0 comments on commit 22e6ea3

Please sign in to comment.