-
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.
Remove
editorKey
mutation and prop-passing
In this commit we're replacing the method of force-upating the editor to reflect language changes with a declarative method based on incorporating the relevant paratemers into the editor key. For example, instead of setting the editor key to `0` and then incrementing to `1` and force-updating it we now set the key to `NOTE_ID-with-spelling-lang-de` or if the detected language change to `NOTE_ID-with-spell-lang-en_US`. This should automatically recreate the editor as we want without going through a workaround to force it. We're also moving the dependent state-based props from `<NoteDetail />` to `<NoteContentEditor />` where they are used so that we don't inexplicably pass them _through_ the parent component.
- Loading branch information
Showing
3 changed files
with
44 additions
and
57 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