FeatherweightLabs / FeatherweightRouter

Clean Swift Router and Coordinator for declarative routing tree matching
Apache License 2.0
102 stars 12 forks source link

Use Path to configure ViewController? #12

Open samritchie opened 8 years ago

samritchie commented 8 years ago

Samples are a little unclear on how route values make it through to the ViewController (e.g. "/animals/5" - how do you access the 5 in the VC?) I’m guessing the Presenter is meant to be passed the store, which it then uses to requery the navigation state?

It would make more sense to me to have the Path passed in to getPresentable, so the Presenter can then do whatever it needs to do to the VC. Unsure if I’m just misunderstanding how it should all fit together though.

nikans commented 7 years ago

I can't imagine a viable router with pattern matching but without a way to actually use that pattern

nikans commented 7 years ago

So I made quick & dirty fork adding RouteArguments when setting up the presentable https://github.com/nikans/FeatherweightRouter