I am completely new to Vue and finding it difficult to understand why I am facing this issue.
Whenever I make a call to my backend in order to fetch some data, the response looks like this:
id: Getter & Setter
name: Getter & Setter
season: Getter & Setter
number: Getter & Setter
Interestingly, if I change data from being a function to an object in Vue, I receive the expected values.
id:10897
name:"Minimum Viable Product"
season:1
number:1
Having gone through Vue's documentation, I understand that data should be a function. However, I fail to see how it impacts the data retrieval process?
This is how I am fetching the data:
methods: {
async episodes() {
const response = await EpisodesService.getAllEpisodes()
console.log(response)
}