You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a List backed by a TCA store, and the each cell in the List has its own store, which is scoped out from the List's store using forEach, I found that whenever an item is added to the list, all the cell views will re-render once. This doesn't happen with a version without TCA (list & cells backed by traditional ObservableObjects) -- only the new cells and updated cells will re-render.
Is there a way to avoid rendering list cells that didn't have any updates, like the non-TCA version? Did I miss something about TCA & the stores/reducers are not set up correctly?
Here is the demo and code:
over-render.mov
(In this case, when there are 5 rows and tapping the "Add row" button should only render cell 6, not 1-5)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I have a List backed by a TCA store, and the each cell in the List has its own store, which is scoped out from the List's store using
forEach
, I found that whenever an item is added to the list, all the cell views will re-render once. This doesn't happen with a version without TCA (list & cells backed by traditional ObservableObjects) -- only the new cells and updated cells will re-render.Is there a way to avoid rendering list cells that didn't have any updates, like the non-TCA version? Did I miss something about TCA & the stores/reducers are not set up correctly?
Here is the demo and code:
over-render.mov
(In this case, when there are 5 rows and tapping the "Add row" button should only render cell 6, not 1-5)
TCA version:
Non-TCA version
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions