Skip to content

How can I pass $state-ful values through layout components retaining reactivity and without ownership_invalid_mutation warnings? #13397

Answered by 7nik
kran6a asked this question in Q&A
Discussion options

You must be logged in to vote

There are only two ways to overcome ownership_invalid_mutation:

  1. Use bind: — add a contract that Component must have a bindable prop, which you always pass and bind separately.
  2. Use context, but it can be inconvenient in many cases.

I'd use a completely other API shape that uses the first approach.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@edd-1701
Comment options

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