You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the sake of the code sharing experience, it would be great that:
The internal object created in the Vue instance was $router
The $navigator.navigate(to, options) method would be $router.push(to, options)
$router.replace(to) would be implemented as the current $navigator.navigate(to, {clearhistory: true})
$router.go(-1) would be implemented as the current $navigator.back()
If this was refactored, the basic navigation could be shared for mobile and web. And this would be an excellent starting point for a better vue-router integration with other non-web implementations.
The text was updated successfully, but these errors were encountered:
I was able to lean on the existing $router variable by doing these hackish changes on startup as a temporary workaround. It's still better than having conditional code for web and native everywhere that needs to route somewhere... I'm sure there will be more things to add and address, but simplifies downstream code quite a bit from what I can tell.
For the sake of the code sharing experience, it would be great that:
$router
$navigator.navigate(to, options)
method would be$router.push(to, options)
$router.replace(to)
would be implemented as the current$navigator.navigate(to, {clearhistory: true})
$router.go(-1)
would be implemented as the current$navigator.back()
If this was refactored, the basic navigation could be shared for mobile and web. And this would be an excellent starting point for a better
vue-router
integration with other non-web implementations.The text was updated successfully, but these errors were encountered: