remove onChange prop again before spreading to react-simple-code-editor #262
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
squashes a bug inadvertently introduced when Move LiveProvider to hooks, fixes #220 #226 was merged
onChange
(and a few other props) before spreading the...rest
remainder down toreact-simple-code-editor
onChange
gets called with aSyntheticEvent
(instead of a value) and that in turns throws a bunch of other errorsas a fix i considered removing the props spread entirely and just being more explicit, but it seems like this was originally introduced to (optionally) support spreading handlers like
onFocus
andonBlur
down to the editor (see Enable rest props to pass to editor #6)onChange
in the destructuring as an unused varBefore
Screen.Recording.2021-06-27.at.12.22.37.pm.mov
After
Screen.Recording.2021-06-27.at.12.23.25.pm.mov