Vuex Compose
API
mapStateToProps
alias: withState
namespace?: string map: Array<string> | key: string | Function Component
Maps state to props, effectively the same as using Vuex's mapState
within your component.
Namespacing is slightly different to mapState
. If you have a module where namespaced: false
, you can still provide a namespace to drill down into the module's state.
;
mapGettersToProps
alias: withGetters
namespace?: string map: Array<string> Component
mapGettersToComputed
namespace?: string map: Array<string> Component
mapMutationsToHandlers
alias: withMutations
mutations: key: string Component
Maps mutations to event handlers. When the specified key is emitted, the mutation will be committed with the provided payload.
mapActionsToHandlers
alias: withActions
namespace?: string map: key: string Component
mapActionsToMethods
namespace?: string map: key: string Component
mapActionsToProps
namespace?: string map: key: string Component
mapActionCreatorsToHandlers
alias: withActionCreators
map: key: Function Component
mapActionCreatorsToMethods
map: key: Function Component
mapActionCreatorsToProps
map: key: Function Component
connect
( namespace?: string, mapStateToProps?: Array<string> | { [key]: string | Function }, mapActionsToHandlers?: { [key]: string }, mapGettersToProps?: Array<string>,) => (Component) => Component
registerModule
namespace: string | Array<string> module: Object
Registers a provided module, only if it has not already been registered previously.
compose
...hocCreators: Array<Function> Component;