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

模組化的Swift架構(一) Redux入門

模組化的Swift架構(一) Redux入門

2022/3/15 ios@Taipei分享
介紹SwiftRex

Hai Feng Kao

June 23, 2022
Tweet

More Decks by Hai Feng Kao

Other Decks in Programming

Transcript

  1. Redux • Single source of truth • Read-only state •

    New state is created by pure function
  2. µFeatures + Redux • A µFeature’s framework target contains •

    Actions • States • Reducers • Middlewares
  3. Redux的缺點 • 當新增⼀個µFeature • 把µFeature的reducer加入reducer list • 把µFeature的middleware加入middleware list •

    把µFeature的state加入global state • 處理reducer、middleware、state的投影(projection)