I'll start by setting the scene and sharing that I am new to both Typescript and Nuxt.
So, I'm trying hook up Airtable with Nuxt and I am making good progress. I created a composable and I am successfully calling the Airtable API. Looping through the received data is going to plan too.
Problem: I am calling the composable from my index.vue "products" page but I'm not received the data from the composable. It seems that I am not doing the async or await properly?
index.vue
`<script setup>
const airtable = useAirtable()
let dataProducts = await airtable.getAirtableData()
console.log('Page Products shows first with dataProducts Undefined', dataProducts)
</script>
<template>
<div>
My Products Page
</div>
</template>`
I am not sure if a stackblotz share helps without me sharing my API access token:
https://stackblitz.com/edit/nuxt-airtable?file=pages%2Fproducts%2Findex.vue,composables%2FuseAirtable.ts