Last active
August 4, 2020 20:15
-
-
Save jgcmarins/d05de0e9357c22a117b3ca2f19fcb427 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* @flow */ | |
| export type ExtractReturn<Fn> = $Call<<T>((...Iterable<any>) => T) => T, Fn>; | |
| const mapStateToProps = state => ({ | |
| fromAnotherApp: state.app.fromAnotherApp, | |
| }); | |
| type ReduxProps = ExtractReturn<typeof mapStateToProps>; | |
| function MyComponent(props: ReduxProps) { | |
| const { fromAnotherApp } = props; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment