Skip to content

Iterating over More Complex Data #2689

Answered by gbj
ghost asked this question in Q&A
Jul 15, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Sure! So, all rendering is handled individually by effects that read from signals -- when you pass something reactive into the view (whether that's a single signal or move || ... closure that reads from a signal), the renderer wraps it in a render effect that will react to any signal reads inside it.

By default every signal read is tracked and every signal write notifies any subscribers, including the renderer, to ensure consistency between the data and the view.

If you explicitly want to "tear" (i.e., have the view show something that is different from what the data contains) you can do that by using untracked reads (.get_untracked() etc) combined with some "trigger" signal that you will…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@gbj
Comment options

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