Skip to content

Instantly share code, notes, and snippets.

@jasonleehodges
Last active October 19, 2019 21:29
Show Gist options
  • Save jasonleehodges/95a17ffee1394c86d087ecd4d032e0bd to your computer and use it in GitHub Desktop.
Save jasonleehodges/95a17ffee1394c86d087ecd4d032e0bd to your computer and use it in GitHub Desktop.
Connected Component with Higher-Ordered Component Wrapper
interface StateProps {
/* define props interface here */
}
interface DispatchProps {
/* define props interface here */
}
export type Props = StateProps & DispatchProps;
export const Navigation: FunctionComponent<Props> = (props) => (
<div className={styles.Navigation}>
Container Content
</div>
);
const ConnectedComponent = connect<StateProps, DispatchProps, {}, RootState>(
(state) => ({}),
(dispatch) => ({}),
)(Navigation);
export default ConnectedComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment