-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly merge incoming props (#1265)
* rename inconsistent `passThroughProps` and `passthroughProps` to more concise `incomingProps` This is going to make a bit more sense in the next commits of this branch, hold on! * split props into `propsWeControl` and `propsTheyControl` This will allow us to merge the props with a bit more control. Instead of overriding every prop from the user' props with our props, we can now merge event listeners. * update `render` API to accept `propsWeControl` and `propsTheyControl` * improve the merge logic This will essentially do the exact same thing we were doing before: ```js let props = { ...propsTheyControl, ...propsWeControl } ``` But instead of overriding everything, we will merge the event listener related props like `onClick`, `onKeyDown`, ... * fix typo in tests * simplify naming - Rename `propsWeControl` to `ourProps` - Rename `propsTheyControl` to `theirProps` * update changelog
- Loading branch information
1 parent
4f8c615
commit 3e19aa5
Showing
37 changed files
with
399 additions
and
284 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
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
Oops, something went wrong.