diff --git a/library/internal/node.ts b/library/internal/node.ts index 346cba2..6328865 100644 --- a/library/internal/node.ts +++ b/library/internal/node.ts @@ -5,15 +5,8 @@ import type { MessageOptions } from "./message" export abstract class Node { readonly children = new Container>() - protected props: Props - constructor(initialProps: Props) { - this.props = initialProps - } - - setProps(props: Props) { - this.props = props - } + constructor(public props: Props) {} modifyMessageOptions(options: MessageOptions) {} diff --git a/library/internal/reconciler.ts b/library/internal/reconciler.ts index dd0c6a9..f8e845d 100644 --- a/library/internal/reconciler.ts +++ b/library/internal/reconciler.ts @@ -81,10 +81,10 @@ const config: HostConfig< prepareUpdate: () => true, commitUpdate: (node, payload, type, oldProps, newProps) => { - node.setProps(newProps.props) + node.props = newProps.props }, commitTextUpdate: (node, oldText, newText) => { - node.setProps(newText) + node.props = newText }, // eslint-disable-next-line unicorn/no-null