Skip to content

Set global state from router on_update #2224

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

You must be logged in to vote

Most methods to write to signals require &mut self to avoid overlapping reads and writes to the same signal, but you can opt-out of the extra checks with write_unchecked. If you only use that method inside the update function instead of write, it will implement Fn

Replies: 1 comment 1 reply

Comment options

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

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