TWIL 2020-10 (3)

jh22j9·2021년 4월 17일

1. useContext, useReducer


🔗 React Hooks - useContext
🔗 React Hooks - useReducer

2. React Redux


🔗 시리즈 | React Redux Tutorials

3. props.dispatch


mapDispatchToProps 메서드를 사용해야만 dispatch.props 를 사용할 수 있는 것이 아님

const { dispatch } = props;
  • By default, a connected component receives props.dispatch and can dispatch actions itself.
  • connect can accept an argument called mapDispatchToProps, which lets you create functions that dispatch when called, and pass those functions as props to your component.

🔗 https://react-redux.js.org/using-react-redux/connect-mapdispatch

0개의 댓글