ReSwift CocoaHeads Tricity

16
TIME TRAVELING WITH RESWIFT ELIASZ SAWICKI @ELISAWIC

Transcript of ReSwift CocoaHeads Tricity

Page 1: ReSwift CocoaHeads Tricity

TIME TRAVELING WITH RESWIFT

ELIASZ SAWICKI @ELISAWIC

Page 2: ReSwift CocoaHeads Tricity

REDUX

Dan Abramov

Page 3: ReSwift CocoaHeads Tricity

UNIDIRECTIONAL DATA FLOW

Page 4: ReSwift CocoaHeads Tricity

REDUX

MAIN ELEMENTS

▸ State

▸ Actions

▸ Reducers

▸ Store

Page 5: ReSwift CocoaHeads Tricity

STATE

Page 6: ReSwift CocoaHeads Tricity

ACTION

Page 7: ReSwift CocoaHeads Tricity

REDUCER

Page 8: ReSwift CocoaHeads Tricity
Page 9: ReSwift CocoaHeads Tricity

STORE

Page 10: ReSwift CocoaHeads Tricity
Page 11: ReSwift CocoaHeads Tricity

RESWIFT

REMEMBER

▸ Keep reducers fast

▸ No side effects in reducers

▸ Avoid heavy application state

▸ One way of changing state

Page 12: ReSwift CocoaHeads Tricity

RESWIFT

WHY?

▸ One way to change state

▸ Easy to understand what is going on

▸ Easy testing

▸ DevTools - Time travelling, Hot reloading

▸ Fixing bugs with friends

Page 13: ReSwift CocoaHeads Tricity

RESWIFT

WHY NOT?

▸ Daunting

▸ Boilerplate

▸ Many ReSwift components are in POC state

▸ Easy to get stuck

Page 14: ReSwift CocoaHeads Tricity

DEVTOOLS

Page 15: ReSwift CocoaHeads Tricity

CREDITS

CHECK THEM OUT!

▸ Karl Bowden - @karlbowden

▸ Benjamin Encz - @benjaminencz

▸ Aleksander Rendtslev - @ARendtslev

▸ Dan Abramov - @dan_abramov

Page 16: ReSwift CocoaHeads Tricity

RESOURCES

CHECK THESE OUT!

▸ https://karlbowden.com/reswift-prezzo/

▸ https://realm.io/news/benji-encz-unidirectional-data-flow-swift/

▸ https://github.com/reactjs/redux

▸ https://github.com/ReSwift/ReSwift

▸ http://eluss.github.io/