Skip to content
Discussion options

You must be logged in to vote

What do you mean by "re-render" in this case, and how are you detecting that it's happening?

If you mean re-rendering a row, I'm not seeing that behavior -- for example, if you add a log inside children you will see that clicking the Change button does not cause individual rows to be re-rendered.

If you mean that the each function is running again, that is because you are writing to the other signal (the list).

This is actually unnecessary though: the each button does not need to write to the outer list, only the inner values, so you can write

// read from `counters` rather than writing to `set_counters`
*counters.read()[2].1.write() += 1;

and it should work as you intend.

Replies: 1 comment 1 reply

Comment options

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

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