-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recording scroll position in dispatch method is necessary for clients using alternative batching strategies, such as react-raf-batching[1]. With an alternative batching strategy, by the time componentWillUpdate is called, browser may have tried to restore position itself (not always correctly), and the recorded position is thus wrong. Also, don't record position for REPLACE action since there is no way to get back to it. [1]: https://github.com/petehunt/react-raf-batching
- Loading branch information
Showing
2 changed files
with
30 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters