Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于react会将所有setStatein event handler排入一个队列,如果event handler中有很大的for循环,react会等待循环吗?
setState
如果 setState 没有发生在事件处理程序中,比如 in componentDidMount,它什么时候会被刷新?
componentDidMount
所以我的问题是,How react decides when to flush all the batched updates? What's the strategy?
How react decides when to flush all the batched updates? What's the strategy?