It seems like older examples of routing use StateManager
and newer examples use the concept of Router
. What is the difference and why you would use one over the other?
Router and Route are just subclasses of StateManager and State, originally the routing specific code was added directly to the StateManager code, but in the last few weeks effort has been made to extract it out.
Basically use the Router for the core flow of your app which deals with URLs and so forth, but if you need to use additional state managers in other places in your application, you can use StateManager/State without the extra Routing code being included when it's not needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With