egoist / vue-client-only

Vue component to wrap non SSR friendly components (428 bytes)
MIT License
474 stars 37 forks source link

[Question] How does it work with a real component that has to be imported? #126

Open educob opened 1 year ago

educob commented 1 year ago

Hi.

I have tried to find a real exmample and the only one is with a comments component not imported anywhere.

Whow does this work with a real component that has to be imported?

Some like:

<tamplate> ...
  <client-only>
    <realcomponent />
  </client-only>
...

<script>
import ClientOnly from 'vue-client-only'
import realcomponent from 'realcmponent'
...

components: {
  ClientOnly,
  realcomponent,
}

Thanks.