You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The useNode and useEditor hooks both provide the actions.setProp. The documentation provides descriptions for each method as shown below, but I'm not entirely clear on the differences.
What is the difference between setProp in useNode and useEditor hooks?
The way they are used may vary slightly, but their ultimate function is the same?
const{// Docs: Manipulate the props of the given Node. // type: (nodeId: NodeId, update: (props: Object) => void) => voidactions: { setProp },}=useEditor();const{// Docs: Manipulate the current component's props. Additionally, specify a throttleRate to throttle the changes recoded in history for undo/redo// type: (props: Object, throttleRate?: number) => voidactions: { setProp },}=useNode();
The text was updated successfully, but these errors were encountered:
Only thing is setProp from Editor accepts an ID so you can change any prop of any node. The other one is node's setProp function. You can only change current node's props
The
useNode
anduseEditor
hooks both provide theactions.setProp
. The documentation provides descriptions for each method as shown below, but I'm not entirely clear on the differences.What is the difference between
setProp
inuseNode
anduseEditor
hooks?The way they are used may vary slightly, but their ultimate function is the same?
The text was updated successfully, but these errors were encountered: