State Updates without Emiting #4211
-
I sometimes find myself wanting to update the store without emiting a new state. For example, I have a large array that gets split up into different arrays. Each sub-array is rendered into component lists. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This really sounds like a question of how to design your UI logic and behavior, rather than "update the state without emitting". Re-rendering the UI based on new Redux state should not wipe out local component state, because that only happens when components are unmounted. If you're seeing that, it suggests that there are other problems with the way you've set up your UI components. Can you give examples of how these components are being rendered right now? |
Beta Was this translation helpful? Give feedback.
This really sounds like a question of how to design your UI logic and behavior, rather than "update the state without emitting".
Re-rendering the UI based on new Redux state should not wipe out local component state, because that only happens when components are unmounted. If you're seeing that, it suggests that there are other problems with the way you've set up your UI components.
Can you give examples of how these components are being rendered right now?