smol reconciler cleanup
This commit is contained in:
@@ -14,7 +14,7 @@ const config: HostConfig<
|
|||||||
never, // SuspenseInstance,
|
never, // SuspenseInstance,
|
||||||
never, // HydratableInstance,
|
never, // HydratableInstance,
|
||||||
never, // PublicInstance,
|
never, // PublicInstance,
|
||||||
{}, // HostContext,
|
never, // HostContext,
|
||||||
true, // UpdatePayload,
|
true, // UpdatePayload,
|
||||||
never, // ChildSet,
|
never, // ChildSet,
|
||||||
number, // TimeoutHandle,
|
number, // TimeoutHandle,
|
||||||
@@ -30,8 +30,9 @@ const config: HostConfig<
|
|||||||
cancelTimeout: global.clearTimeout,
|
cancelTimeout: global.clearTimeout,
|
||||||
noTimeout: -1,
|
noTimeout: -1,
|
||||||
|
|
||||||
getRootHostContext: () => ({}),
|
// eslint-disable-next-line unicorn/no-null
|
||||||
getChildHostContext: () => ({}),
|
getRootHostContext: () => null,
|
||||||
|
getChildHostContext: (parentContext) => parentContext,
|
||||||
|
|
||||||
createInstance: (type, props) => {
|
createInstance: (type, props) => {
|
||||||
if (type !== "reacord-element") {
|
if (type !== "reacord-element") {
|
||||||
@@ -78,7 +79,6 @@ const config: HostConfig<
|
|||||||
parent.children.addBefore(child, before)
|
parent.children.addBefore(child, before)
|
||||||
},
|
},
|
||||||
|
|
||||||
// eslint-disable-next-line unicorn/no-null
|
|
||||||
prepareUpdate: () => true,
|
prepareUpdate: () => true,
|
||||||
commitUpdate: (node, payload, type, oldProps, newProps) => {
|
commitUpdate: (node, payload, type, oldProps, newProps) => {
|
||||||
node.setProps(newProps.props)
|
node.setProps(newProps.props)
|
||||||
|
|||||||
Reference in New Issue
Block a user