Closed trusktr closed 8 years ago
The reason I'm redirecting in the action
is because I'm using async/await in there, and I might need to redirect a few ticks later, and it's a good balance: triggers for sync control of the route, and async in the action using async CSP communication between the action and the UI.
By the way, the action
function itself is not async
, it just calls async
functions inside, so the router itself is never blocked.
You could use this I think: https://github.com/kadirahq/flow-router#flowrouterwithreplacestatefn
:+1:
Is it possible to redirect in an action? I know I can use FlowRouter.go, but by default it doesn't remove the previous location from the history, like a "redirect" does. Is there an option to pass to the
go
function to treat it like a redirect so it erases the previous history item?