Skip to content

Instantly share code, notes, and snippets.

@jgcmarins
Last active August 4, 2020 20:15
Show Gist options
  • Select an option

  • Save jgcmarins/d05de0e9357c22a117b3ca2f19fcb427 to your computer and use it in GitHub Desktop.

Select an option

Save jgcmarins/d05de0e9357c22a117b3ca2f19fcb427 to your computer and use it in GitHub Desktop.
/* @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