Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera

uno-de-piera/getter.js Secret

Last active Jan 23, 2019
Embed
What would you like to do?
export function peliculasFiltradas (state, busqueda) {
return state.movies.filter(movie => movie.title.toLowerCase().includes(busqueda))
}
<template>
<ul>
<li v-for="movie in $store.getters.peliculasFiltradas('texto a buscar')" :key="movie.id">{{ movie.title }}</li>
</ul>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment