next.js
7bbc1aec - Aggregate updates using `addStatusHandler` and `Promise.resolve` instead of `setTimeout` (#42350)

Commit
3 years ago
Aggregate updates using `addStatusHandler` and `Promise.resolve` instead of `setTimeout` (#42350) The current `setTimeout` logic adds a constant overhead of 30ms when applying updates, which slows down HMR. As @sokra suggested, we can use the `addStatusHandler` API to have the HMR runtime let us know when its status changes. This also switches to `Promise.resolve` for update aggregation.
Author
Parents
Loading