Created
March 13, 2019 03:44
-
-
Save webmasterdevlin/0e49e6e2a39098e4b1094593c59cda48 to your computer and use it in GitHub Desktop.
Vuex Getters : src/store/modules/heroes/getters.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as types from "../../types"; | |
const getters = { | |
[types.GETTERS_INIT_HEROES]: state => state.heroes, // retrieves the current heroes array from the state | |
[types.GETTERS_INIT_HERO]: state => state.hero // retrieves the current hero object from the state | |
}; | |
export default getters; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment