-
Notifications
You must be signed in to change notification settings - Fork 20
Dispatch router event actions #35
Comments
The main intent of this library is to keep your store in sync the Angular Router URL, since its the source of truth as to what's display on the page. I'll look into adding the router events, but its also easy enough to map the router events into the store without adding them to this package. |
Is it even appropriate to wrap/replicate the |
@milkisevil I'm beginning to think the same thing. I'm currently running into an issue using the module with Nativescript where I need to call Trying to think through how I stick with this pattern of emitting the |
The actions are provided so that your navigation can flow through your state. Also if you're using the devtools to debug and time travel through the state, those actions with trigger navigation along with your state changes. There is going to be an update to this library that no longer uses router actions for navigation and takes a different approach to reducing the state during navigation. There will be breaking changes due to these changes. The repo is here for now https://github.com/vsavkin/router-store |
@brandonroberts Thanks for the quick response. That's great news! |
@brandonroberts so what would we now do in 4.X with router-store where I'm currently migrating but used go/back/forward? |
I think this module would be more useful if we would change it in the following way.
go
,replace
etc toTRIGGER_GO
etc.This way we can use the action methods for triggering any router actions. This is an extra way to trigger router methods, you can still use
routerLink
and orrouter.go
etc.We can use the RouterEvent actions to react to any router event, be it in a reducer, or using
@Effect
.The text was updated successfully, but these errors were encountered: