Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
typeof props.children === 'string' ||
typeof props.children === 'number'
);
},
shouldDeprioritizeSubtree(type, props) {},
createTextInstance(
text,
rootContainerInstance,
hostContext,
internalInstanceHandle
) {
return new SSRTreeNode(RAW_TEXT_TYPE, text);
},
scheduleDeferredCallback: ReactScheduler.unstable_scheduleCallback,
cancelDeferredCallback: ReactScheduler.unstable_cancelCallback,
shouldYield: ReactScheduler.unstable_shouldYield,
scheduleTimeout: setTimeout,
cancelTimeout: clearTimeout,
setTimeout: setTimeout,
clearTimeout: clearTimeout,
noTimeout: -1,
// Commit hooks, useful mainly for react-dom syntethic events
prepareForCommit() {},
resetAfterCommit() {},
now: ReactScheduler.unstable_now,
isPrimaryRenderer: true,
//useSyncScheduling: true,
UpdatePayload,
ChildSet,
TimeoutHandle,
NoTimeout
> = {
//https://github.com/sencha/ext-react/issues/306#issuecomment-521906095
scheduleDeferredCallback: scheduler.unstable_scheduleCallback,
cancelDeferredCallback: scheduler.unstable_cancelCallback,
// @ts-ignore not in typings
schedulePassiveEffects: scheduler.unstable_scheduleCallback,
cancelPassiveEffects: scheduler.unstable_cancelCallback,
// @ts-ignore not in typings
shouldYield: scheduler.unstable_shouldYield,
now: scheduler.unstable_now,
getPublicInstance(instance: Instance | TextInstance): PublicInstance {
// TODO (this was a complete guess).
return instance;
},
getRootHostContext(rootContainerInstance: Container): HostContext {
return {
isInAParentText: false,
isInADockLayout: false,
isInAGridLayout: false,
isInAnAbsoluteLayout: false,
isInAFlexboxLayout: false,
};
},
getChildHostContext(parentHostContext: HostContext, type: Type, rootContainerInstance: Container): HostContext {
/*
get: function get() {
return _scheduler.unstable_shouldYield;
}
});