ParadoX
ParadoX
NNuxt
Created by ParadoX on 9/6/2024 in #❓・help
Typecheck errors on all that is auto imported
3 replies
NNuxt
Created by ParadoX on 9/6/2024 in #❓・help
Typecheck errors on all that is auto imported
Tried everything. It seems to be related to vue
3 replies
NNuxt
Created by ParadoX on 8/9/2024 in #❓・help
How to create a stateful composable that uses useState?
But it feels a bit wonky to pass the results back to the composable after calling it from outside 🤔
9 replies
NNuxt
Created by ParadoX on 8/9/2024 in #❓・help
How to create a stateful composable that uses useState?
9 replies
NNuxt
Created by ParadoX on 8/9/2024 in #❓・help
How to create a stateful composable that uses useState?
In order to avoid double requests 🤔
9 replies
NNuxt
Created by ParadoX on 8/9/2024 in #❓・help
How to create a stateful composable that uses useState?
But I want to use useAsyncData because of SSR.
9 replies
NNuxt
Created by ParadoX on 8/9/2024 in #❓・help
How to create a stateful composable that uses useState?
Bonus question: Inside my composable useSearch that exports a function that returns this:
const fetchResults = () => useAsyncData(() => $fetch([...]))
const fetchResults = () => useAsyncData(() => $fetch([...]))
Somewhere else I might use it like that:
const { fetchResults } = useSearch();
const { data, pending, status, error} = await fetchResults();
const { fetchResults } = useSearch();
const { data, pending, status, error} = await fetchResults();
Is there a way of accessing data, pending, status and error inside the composable itself? 🤔 I need those to be part of the gobale state
9 replies