Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mutations: {
- toggleAvailability(state, book) {
- const index = state.books.findIndex(b => b.id === book.id);
- state.books[index].available = !state.books[index].available;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement