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
you can subscribe the B component to the props update of A component:
functionBComponent(){const{ store }=useEditor()useEffect(()=>{constunsubscribe=store.subscribe(state=>{return{// you have to get the id of A componentprops: state.nodes[idOfAComponent].data.props}},collected=>{console.log(collected.props);})return()=>unsubscribe();},[store])// ...}
You can store the A component's id inside the B components' props or custom object considering the A component has already been created when you are creating the B component.
I have two component: A, B
How to let the B component know the props update of the A component
The text was updated successfully, but these errors were encountered: