forked from reduxjs/react-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Omit built-in
context
prop if user component props include context
Connected components allow users to pass in a `ReactReduxContext` instance as a prop named `context`. We also do internal checks to see if that really _is_ a context instance, in case the user passed a real value as `props.context`. However, the TS types did not reflect this - `props.context` was always a `ReactReduxContext` type, and if users did have a component that accepted a prop named `context`, this would cause a type clash. In this case, the types didn't reflect the reality of runtime behavior. By extracting "the props of the component" and omitting the built-in `context` field type if appropriate, this now works.
- Loading branch information
1 parent
bbc546e
commit f40d82d
Showing
3 changed files
with
54 additions
and
14 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