From e4af32331d5eecd43f52252564cf2ccc06f1f133 Mon Sep 17 00:00:00 2001 From: Hendrik Liebau Date: Wed, 15 Mar 2017 11:16:38 +0100 Subject: [PATCH] react-redux: add failing test for map{State|Dispatch}ToProps factories --- react-redux/react-redux-tests.tsx | 6 ++++++ 1 file changed, 6 insertions(+) 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