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

What is transaction in react? #90

Open
zhouzhongyuan opened this issue Sep 21, 2017 · 1 comment
Open

What is transaction in react? #90

zhouzhongyuan opened this issue Sep 21, 2017 · 1 comment
Labels

Comments

@zhouzhongyuan
Copy link
Owner

No description provided.

@zhouzhongyuan
Copy link
Owner Author

zhouzhongyuan commented Oct 10, 2017

  • It is just a pattern the React team has adopted to make the framework more robust and easier to maintain.

Advantages

  • The transactions that happen during a React render handle many other things such as maintaining the window’s scroll position, and a lot of other necessary book keeping.
  • Another benefit of the transaction pattern is it becomes easy to store the state of the browser, do a whole bunch of work, then restore the state at the very end, rather than having to continually worry about accidentally scrolling the window or clearing an input selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant