Skip to content

Why isn't this #[watch] of a SharedState variable working? #617

Answered by AaronErhardt
pieterdd asked this question in Q&A
Discussion options

You must be logged in to vote

#[watch] updates the property every time a components receives a message (input or command). SharedState does not send a message to your component unless you subscribe, so the property isn't updated.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by pieterdd
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