Skip to content Skip to sidebar Skip to footer

Vue Getter & Setter Instead Of The Actual Values In Backend Response

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 & Set

Solution 1:

https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function

you can change data to be an object instead of a function, but not recommend. If Vue didn’t have this rule, clicking on one component would affect the data of all other instances.

Solution 2:

Use the JSON stringify function:

JSON.stringify(response.data.allEpisodes)

Post a Comment for "Vue Getter & Setter Instead Of The Actual Values In Backend Response"