Get the latest tech news
In React {Transitions} = F(state)
Thinking about the React component tree as modeling a state machine can help clarify the implications of asynchronous updates and React’s concurrent features.
Some of React’s concurrent mode features, for example startTransition, allow you to perform state updates which intentionally do not flush to the DOM before yielding to the user. {transitions} = f(state) is a useful mental model for thinking about how your application guards against letting users trigger invalid updates. Thanks to Evan Yeung for the conversations which lead to this observation and to Joe Savona, Jordan Brown, Jack Pope and Rick Hanlon for reading early drafts of this post.
Or read this on Hacker News