[Vuejs]-Vue.js how to configure a component before loading them in template?

0👍

You can put a v-if on the Provider component so that it only loads once the strapiClient variable has loaded.

<Provider v-if="strapiClient" :client="strapiClient">
    <Query query= "{ questionDomains { name, description, question_topics {name,description, question_items {name, description}}}}"
        v-slot="{ data, fetching }">
        <div>
            <pre>{{ data }}</pre>
        </div>
        <span>{{jwtStrapi}} </span>
    </Query>
</Provider>
<div v-else>Is Fetching ...</div>

Leave a comment