Adam Robertson
Adam Robertson

Reputation: 1

Pushing component one level down with Vue 3 and Ionic

Instead of mounting my component directly to #app, I'm trying to push my component one level down so I can pass props to it from the HTML file it lives in. However, nothing shows up and there aren't any console errors. I'm sure it's just me misunderstanding how Vue 3 and createApp works.

My HTML file:

<div id="app">
  <my-component />
</div>

My main JS file:

import { createApp } from 'vue'
import MyComponent from './pages/MyComponent.vue'
import { IonicVue } from '@ionic/vue'

const app = createApp({
  components: {
    MyComponent: {
      props: {
      },
    }
  },
})
.use(IonicVue)
.mount("#app");

Thank you in advance!

Upvotes: 0

Views: 217

Answers (0)

Related Questions