Change route outside a component
goldylucks opened this issue · 1 comments
goldylucks commented
I'm in SPA & no SSR mode, and want to change the route outside a component.
With react router 4, the way to do it is pass a history object to the browser, and then import it wherever you need it and call actions on it to change the route, as discussed in their repo
In react-pwa the router config is abstracted away. How can we accomplish this?
would be happy to PR documentation with some guidance :)
tirthbodawala commented
@goldylucks with reactpwa you can access the history in use via window.PAW_HISTORY
would that help?
Sorry for late reply.