I see a warning in the console.log that I want to omit to avoid unwanted side effects.
Component : setup function returned a promise, but no
boundary was found in the parent component tree. A
component with async setup() must be nested in a in order
to be rendered
The reason why I see this is the await
-statement when I await a promise from a pinia-store:
<script setup async lang="ts">
const libraryStore = useLibraryStore()
// other declarations
await libraryStore.loadArticles(lang, options)
</script>
What is best practice to deal with asynchronous functions? In my case, loadArticles
is performing some AJAX-Requests and so I have to wait for the response.