From 6747f7bdaf9d5c0fafc74bcc6b35b2546df7bfa3 Mon Sep 17 00:00:00 2001 From: MapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com> Date: Sat, 25 Dec 2021 04:05:40 -0600 Subject: [PATCH] smol reconciler cleanup --- src.new/reconciler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src.new/reconciler.ts b/src.new/reconciler.ts index b50ad08..cc66afa 100644 --- a/src.new/reconciler.ts +++ b/src.new/reconciler.ts @@ -14,7 +14,7 @@ const config: HostConfig< never, // SuspenseInstance, never, // HydratableInstance, never, // PublicInstance, - {}, // HostContext, + never, // HostContext, true, // UpdatePayload, never, // ChildSet, number, // TimeoutHandle, @@ -30,8 +30,9 @@ const config: HostConfig< cancelTimeout: global.clearTimeout, noTimeout: -1, - getRootHostContext: () => ({}), - getChildHostContext: () => ({}), + // eslint-disable-next-line unicorn/no-null + getRootHostContext: () => null, + getChildHostContext: (parentContext) => parentContext, createInstance: (type, props) => { if (type !== "reacord-element") { @@ -78,7 +79,6 @@ const config: HostConfig< parent.children.addBefore(child, before) }, - // eslint-disable-next-line unicorn/no-null prepareUpdate: () => true, commitUpdate: (node, payload, type, oldProps, newProps) => { node.setProps(newProps.props)