-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: queueing a series of updates #1095
base: main
Are you sure you want to change the base?
Conversation
set_friend_count(lambda fc: fc * 2) | ||
``` | ||
|
||
If you prefer more verbose code, another common convention is to repeat the full state variable name, like `set_enabled(lambda enabled: not enabled)`, or to use a prefix like `set_enabled(lambda prev_enabled: not prev_enabled)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention multi-threaded cases somewhere. Have a note that in multi-threaded cases they aren't batched by default and you need to use the use_render_queue
to ensure they do get batched if you're going to do work from a background thread.
Got a note about it in the use_render_queue
docs: https://salmon.deephaven.io/core/ui/docs/hooks/use_render_queue/#batch-updates
This is different than React because JS is single threaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note and linked to the use_render_queue
docs.
Co-authored-by: Mike Bender <[email protected]>
https://deephaven.atlassian.net/browse/DOC-366