Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

using loading utilities inside script setup #1526

Unanswered
tobystokes asked this question in Q&A
Discussion options

I can't for the life of me get the loading utilities to work from a <script setup>.

However they do work fine from within a setup function:

<script>
import { useGlobalQueryLoading } from "@vue/apollo-composable";
export default {
 setup() {
 const loading = useGlobalQueryLoading();
 return {
 loading
 };
 }
};
</script>

But this doesn't:

<script setup>
import { useGlobalQueryLoading } from "@vue/apollo-composable";
const loading = useGlobalQueryLoading();
</script>

I can't think of a reason why that 'syntactic sugar' should make a difference, is this expected or known behaviour?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /