-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
systemTag
changes to stop directly mutating note object (#…
…1615) Previously we have been directly mutating the note object in the action creator when toggling a note's pinned status, markdown status, publish status, and trash status. This mutation can lead to concurrency defects which expose themselves as inconsistent UI state. This breaks our Redux model which assumes that all UI updates happen atomically. In this patch we're building a new note object when toggling these system tags in order to maintain our consistency. At the same time I have removed the thunks from the action creators since they weren't doing anything and didn't need to exist. This shouldn't have a noticeable impact on the application.
- Loading branch information
Showing
1 changed file
with
43 additions
and
43 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