by dceddia · 10y ago · 0 comments
As another example, imagine that a chat app is receiving messages from a websocket. Each time it receives a message it should re-render the list of messages. The "current list of messages" is state. Each received message gets pushed onto an array inside state, which triggers a re-render.
That's not really "UI interaction state" in the sense that the user triggered it, but it's definitely state the UI needs to track unless it wants to fetch the entire list of messages every time a new one arrives.