Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Implementing Reactive Programming with ReSwift

Implementing Reactive Programming with ReSwift

2017 Swift Korea Meetup 2 - ReSwift로 리액티브 프로그래밍 구현하기

Avatar for Eunju Amy Sohn

Eunju Amy Sohn

December 13, 2017
Tweet

More Decks by Eunju Amy Sohn

Other Decks in Programming

Transcript

  1. State State Changes Views - 앱의 모든 상태는 Store에 저장되어

    관리 - State는 Action에 의해서만 변경 가능 - 단방향 데이터 흐름
  2. State State Changes Views - 앱의 모든 상태는 Store에 저장되어

    관리 - State가 변화할 때 업데이트 - State는 Action에 의해서만 변경 가능 - 단방향 데이터 흐름
  3. 언제 ReSwift를 사용하면 좋을까? • 여러 곳에서 같은 state를 사용,

    변경하는 어플리케이션 • 부작용 핸들링을 해야할 때 • 단방향 데이터 흐름으로 부작용 최소화 • 웹소켓, 다양한 API를 사용할 때 * https://karlbowden.com/reswift-prezzo/
  4. 이럴 때는 추천드리지 않습니다 • State가 너무 많거나 큰 어플리케이션

    • Ex) Image를 직접적으로 저장해두지 말아주세요 • 제스쳐 액션 퍼포먼스가 중요한 앱일 때 • RxSwift를 쓰세요! • Reducer를 심하게 괴롭힐 가능성이 있을 때 (끊이지 않는 action) • 속도 문제를 고려해야합니다. * https://karlbowden.com/reswift-prezzo/
  5. References • https://github.com/ReSwift/ReSwift/issues/78 • https://stackoverflow.com/questions/34497343/redux-rxjs-any- similarities • https://redux.js.org/docs/introduction/PriorArt.html • https://github.com/ReSwift/ReSwift

    • https://karlbowden.com/reswift-prezzo/ • https://medium.com/cocoaacademymag/architecture-thoughts- migrating-marvels-ios-app-to-reswift-ef7f20e84e60