Hey everyone! I’m kinda new to Vue.js and I’ve been struggling to get my Airtable data into my app. I’ve been at it for hours and I think I’m close, but I could really use some help.
I’m using the Airtable NPM package to fetch the data. Here’s what I’ve got so far:
I’ve worked with Airtable and Vue.js quite a bit, and I can see where you’re running into trouble. The issue is that you’re not updating your component’s data with the fetched information. Here’s how I’d modify your mounted hook:
I see you’re using the Airtable NPM package, but have you considered using the official Airtable API instead? It’s more straightforward and well-documented. Here’s a quick example:
This approach is more Vue-friendly and easier to work with. Remember to use a .env file for your API key and base ID for security. Once you have the data in infoList, you can easily display it in your template using v-for.
hey there, i’ve been through this before! looks like you’re close. try pushing the entries to your infoList array instead of just logging them. something like: