Re:[video] Unidirectional Data Flow in Swift
by ediasnz on Wednesday January 20, 2016 @10:48PM
(#10943231)
How would you pass parameters to the next view controller on the flow?
[ Parent
| on HN ]
Re:[video] Unidirectional Data Flow in Swift
by ctietze on Thursday January 21, 2016 @03:26PM
(#10948047)
I think you wouldn't; instead, you change the state twice: once the "model" state, once the navigation state.
The first will incorporate the changes of the current view controller and make it accessible to whoever is interested -- and then the next view controller will show the current "model" state which in fact includes everything that was changed already.
Re:[video] Unidirectional Data Flow in Swift
by Ben-G on Thursday January 21, 2016 @10:53PM
(#10950653)
That is correct! However, we are also working on making it possible to pass data as part of the routing process (that will be implemented in ReSwiftRouter) as that is necessary for recursive routes.
Re:[video] Unidirectional Data Flow in Swift
by ediasnz on Saturday January 23, 2016 @10:05PM
(#10961280)
I think passing data will be required in some cases in order to solve the dependencies of the next view controller on the flow. Otherwise the store will have to solve these dependencies of all View Controllers which I think it's not ideal.