로토의 블로그
  • Resume
  • Blog
  • Github
  • Twitter
  • Linkedin

redux

A collection of 2 posts

redux

redux-saga를 쓰니 좋은 점

아래와 같은 비동기 로직이 있다고 할 경우, redux-thunk로 표현하면 아래와 같은 모양일 것이다. function findPolicy({ paylaod }) { const { id } = payload; return (dispatch) => { return new Promise((resolve) => { if (_.isNumber(id)) { return api.findById(

  • 로토
    로토
1 min read
react.js

TIL: 20170829

redux mapToState는 얕은 비교(shallow equals)을 한다. https://github.com/reactjs/redux/issues/585 참고. immutablity-helper로 reducer를 변경할 때, array 배열에 값을 추가하거나 하는 것으로는 rerendering이 일어나지 않는다. reducer를 업데이트 하기 전에

  • 로토
    로토
1 min read
로토의 블로그 © 2022
Latest Posts Facebook Twitter Ghost