Fetch data from an API using Pinia in Nuxt 3 #2654
Unanswered
adamboother
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling to work out the best way to fetch data from an API in Pinia within a Nuxt 3 project, in order to then be able to access that data in the store when my static site is generated.
I have seen suggestions for getters and actions, something along the lines of the below:
but I'm not sure which option is correct and how to then run the fetch and access the data within a component.
Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions