News for hackers. Stuff that matters.
Re:Scheduling in React by acemarke on Thursday March 07, 2019 @04:35PM (#19332718)
And I would say I reasonably qualify as a "React expert", and was having a discussion on this topic yesterday:

https://twitter.com/acemarke/status/1103373148169347072

There's a lot of nuance involved here. Moving some behavior outside the current tick may speed certain things up. Keeping multiple React updates in the same tick may _also_ speed other things up. It depends on what work is being done in these additional callbacks, and where/when they're being executed.

In this specific case: `this.props.onChange()` calls the parent component's `setState()`. That should ideally be kept in the same tick as `this.setState()`, so they can be batched.

`sendAnalyticsPing()` does _not_ cause a React update. That should indeed be moved out to a separate tick, so that it doesn't slow down this update.

There are no comments on this comment yet.