Routes not showing when using transitions and router.push #2444
-
ReproductionSteps to reproduce the bugWhen trying to use transitions on routes everything works correctly but when I use router.push to navigate to a page, the page we navigate to doesn't display at all and gets fixed when the app refreshes Is it because of how Im implementing it or is it something else ? export default defineComponent({ This is the router index file : export default router Expected behaviorWhen using router.push it should show all the transitions and the routes when we are navigating to them Actual behaviorThe destination route doesnt display until we refresh the page Additional informationProject is made with capacitor vue js |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I'd be surprised if this is a bug in Vue Router. I don't see anywhere that you're calling There are some bugs in Vue core with transitions that might be relevant here. Check that your route components only have a single root node, including comments. For example, this can break: <template>
<!-- This comment breaks it -->
<div>
...
</div>
</template> I believe there's already a PR in the core repo to fix this problem, but I can't tell whether that's relevant to your problem based on the code you've shared. Also make sure you don't have any warnings or errors in the browser console. I'm not sure how that works with a Capacitor project, but I'd assume there's some way to access the console output. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
@paul-thebaud I suggest providing a runnable reproduction, e.g. using the playground. I think it's going to be difficult to figure out what the problem is without one. |
Beta Was this translation helpful? Give feedback.
-
@skirtles-code, I made a playground and no problem. I deep dived my code, I have an eslint disable comment at the template root... My bad. Sorry for disturbing and thanks for your quick answer. |
Beta Was this translation helpful? Give feedback.
I'd be surprised if this is a bug in Vue Router.
I don't see anywhere that you're calling
router.push
in the reproduction. I tried adding one myself but that seemed to be working for me.There are some bugs in Vue core with transitions that might be relevant here. Check that your route components only have a single root node, including comments. For example, this can break:
I believe there's already a PR in the core repo to fix this problem, but I can't tell whether that's relevant to your problem based on the code you've shared.
Also make sure you don't have any warnings or errors in the browser console. I'…