Skip to content

Passing State as Prop and State Updater as Prop #3051

Answered by ealmloff
Android789515 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure I understand. You can pass Signals in props like normal by adding a field field: Signal<Data> to your props. If you read the signal in your child component, it will rerun the component when the signal changes

There is a section in the guide that does this with ReadOnlySignal for the StoryListing component: https://dioxuslabs.com/learn/0.5/guide/state

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Android789515
Comment options

Answer selected by Android789515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants