Imagine I have a Vue component with data retrieved from an external API, containing information about various books:
data: () => ({
books: [
{name: 'The Voyage of the Beagle', author: 'Charles Darwin'},
{name: 'Metamorphoses', author: 'Ovid'},
{name: 'The Interpretation of Dreams', author: 'Sigmund Freud'},
],
}),
I want to add presentation variables for each book, such as determining if a book is open or not. These variables should not be included in the API response to avoid cluttering it with presentation data.
Is there a conventional method in Vue to achieve this?