Comment

Comment by acemarke

How does this "improve" at all?

In fact, that example will eliminate any chance React might have of batching multiple updates into a single render pass.

React wraps all event handlers in a call to `unstable_batchedUpdates()`. All updates that are queued in that event handler will be batched together.

Splitting updates into multiple ticks will keep them from being batched.

parent acemarke 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton