finish reconciler bindings
getPublicInstance(instance: Instance | TextInstance): PublicInstance {
return instance;
}
prepareForCommit(_containerInfo: Container): void {
// noop
}
prepareUpdate(
_instance: Instance,
_type: Type,
_oldProps: Props,
_newProps: Props,
_rootContainerInstance: Container,
_hostContext: HostContext
): null | UpdatePayload {
return true;
}
resetAfterCommit(_containerInfo: Container): void {
// noop
}
finalizeInitialChildren(
_parentInstance: Instance,
_type: Type,
_props: Props,
_rootContainerInstance: Container,
_hostContext: HostContext
): boolean {
return true;
}
commitUpdate(
instance: Instance,
_updatePayload: any,
_type: string,
_oldProps: Props,
newProps: Props
): void {
return instance.commitUpdate(newProps);
}
commitMount(instance: Instance, _type: Type, _newProps: Props): void {
instance.commitMount();
}
shouldDeprioritizeSubtree(): boolean {
return true;
}
scheduleDeferredCallback(
callback?: () => any,
_options?: { timeout: number }
): any {
if (callback) {
throw new Error(
'Scheduling a callback twice is excessive. Instead, keep track of ' +
'whether the callback has already been scheduled.'
);
}
}
cancelDeferredCallback(_callbackID: any): void {
// noop
}
setTimeout(
handler: (...args: any[]) => void,
timeout: number
): TimeoutHandle | NoTimeout {
return setTimeout(handler, timeout);
}
clearTimeout(handle: TimeoutHandle | NoTimeout): void {
return clearTimeout(handle);
}
npm run start