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?
Ember.js: Whats the difference between Router / Route and StateManager / State?
Asked Answered
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.
© 2022 - 2024 — McMap. All rights reserved.