-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce rerendering on startup (#12847)
* Ensure viewport data store changes happen immediately on startup. We need to call `flush`, so that the changes happen synchronously, rather than asynchronously, on the next event loop. This avoids the re-rendering of all `BlockListBlock` instances during startup. * Ensure `state.hasUploadPermissions` is always a boolean. The reducer for this property defaults to an empty object, which not only is incorrect (since this is a boolean), but also causes unnecessary re-renders by changing reference. By defaulting to `true` instead, we fix both problems. * Add a couple of tests for hasUploadPermissions reducer. * Core Data: Add CHANGELOG entry for hasUplaodPermissions boolean fix * Viewport: Add CHANGELOG entry for synchronous assignment
- Loading branch information
1 parent
d97a373
commit 73b1a4f
Showing
5 changed files
with
34 additions
and
2 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
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
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