I'm new to Vue and I'm struggling to understand why my problem is happening.
When I make a call to my backend to retrieve some data the response is as follows:
id: Getter & Setter
name: Getter & Setter
season: Getter & Setter
number: Getter & Setter
Within Vue, if I change data to be an object instead of a function, I get the values I expect.
id:10897
name:"Minimum Viable Product"
season:1
number:1
From reading Vue's documentation I know data should be a function, however I don't see why it affects the data I am getting?
I retrieve the data like so:
methods: {
async episodes() {
const response = await EpisodesService.getAllEpisodes()
console.log(response)
}