question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: vue 3 neasted child display error

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

To use tab component it’s need to use ionic/vue-router but i cannot use router-view anymore or i get duplicated route. Screenshot 2021-11-09 at 17 41 07 if i switch totally to ion-router-outlet i have css issue. Screenshot 2021-11-09 at 17 40 59

Expected Behavior

Using ionic without ionic/vue-router should be allowed for tabs with router-view Or Allowing to have other route with router-view Or Ability to disabe host css for ion-router-outlet Screenshot 2021-11-09 at 16 08 30

Steps to Reproduce

Clone this repo : https://github.com/riderx/vitesse-ionic Go to bug branch Dopnpm i Do pnpm dev Go to the new server you should see the duplicated route problem To see the error with ion-router-outlet vistit page with ldefault ayout, like hi From home page Write something in the input and click button go Then you will see footer component over hi page.

I found a workaround to make it work with v-if condition on ion-router-outlet as see in main branch : https://github.com/riderx/vitesse-ionic/blob/main/src/App.vue But is sound very wierd to do that

Code Reproduction URL

https://github.com/riderx/vitesse-ionic/tree/bug

Ionic Info

Ionic:

Ionic CLI : 6.18.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 6.0.0-rc.2

Utility:

cordova-res (update available: 0.15.3) : 0.15.2 native-run : 1.5.0

System:

NodeJS : v14.18.1 (/usr/local/bin/node) npm : 6.14.15 OS : macOS Monterey

Additional Information

i made issue on package who have conflic with ionic : the https://github.com/JohnCampionJr/vite-plugin-vue-layouts/issues/46

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Nov 15, 2021

At first glance I can see that your “hi page” does not use the IonPage component. Any pages rendered inside of ion-router-outlet need to be wrapped in <ion-page> in order to work properly.

There’s a lot going on in your app and I get the following error, so it is hard to debug:

Module not found: Error: Can't resolve './src/main.js' in '/Users/liamdebeasi/Ionic/vitesse-ionic'

Can you try adding <ion-page> to the pages you render inside of ion-router-outlet and let me know if that solves the issue?

0reactions
ionitron-bot[bot]commented, Dec 16, 2021

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toggling nested components with async setup inside ... - GitHub
I tracked down this issue. When a component with asyncDep is toggled, the component will be re-mount, which means registerDep will be called....
Read more >
Vue nested routes issue with rendering child component
I have parent route User and child route UserQuotes , which is not rendering. No error or warning in console. Vue devtools is...
Read more >
Handling Edge Cases - Vue.js
All the features on this page document the handling of edge cases, meaning unusual situations that sometimes require bending Vue's rules a little....
Read more >
Vue Router - Vue Testing Handbook
We will build a simple <App> , that has a /nested-child route. Visiting /nested-child renders a <NestedRoute> component. Create an App.vue ...
Read more >
3 Anti-Patterns to avoid in Vue.js - Binarcode
Mutating nested props · What if we have a requirement to add a Cancel button and revert typed changes · What if our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found