Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttle update to only occur one at a time #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesstelford
Copy link

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