Skip to content

Throttle update to only occur one at a time - #2

Open
jesstelford wants to merge 1 commit into
Swizec:masterfrom
jesstelford:speedup
Open

Throttle update to only occur one at a time#2
jesstelford wants to merge 1 commit into
Swizec:masterfrom
jesstelford:speedup

Conversation

@jesstelford

Copy link
Copy Markdown

By using the callback to setState, updates are only run one at a time once the
previous update has completely finished (ie; fully flushed to the DOM, which can take longer than it takes for the next mousemove event to fire).

Contrary to popular belief, setState is not necessarily synchronous.

By using the callback to `setState`, updates are only run one at a time once the
previous update has completely finished.

Contrary to popular belief, `setState` is not necessarily synchronous.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant