setState() in setImmediate

(Matianfu) #1

I wonder if I call this.setState() in setImmediate(), will it be guaranteed not being batched with other setState() operations?

One of our code pattern must use this.state and this.props to construct next state, the function argument version of setState cannot be used. So I want to know if setImmediate is a possible workaround.