diff --git a/react-redux/react-redux-tests.tsx b/react-redux/react-redux-tests.tsx index 5d1f32765f..4c7a55ea7b 100644 --- a/react-redux/react-redux-tests.tsx +++ b/react-redux/react-redux-tests.tsx @@ -56,10 +56,16 @@ interface ICounterStateProps { interface ICounterDispatchProps { onIncrement: () => void } +// with higher order functions connect( () => mapStateToProps, () => mapDispatchToProps )(Counter); +// with higher order functions using parameters +connect( + (initialState: CounterState, ownProps: {}) => mapStateToProps, + (dispatch: Dispatch, ownProps: {}) => mapDispatchToProps +)(Counter); // only first argument connect( () => mapStateToProps