You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue as been imported as question since it does not respect nuxt.js issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/nuxt.js/issues/c9337.
jinash
changed the title
Re-usability of vuex actions and mutations using typescript
Re-usability of vuex store using typescript
Jun 10, 2019
How can I implement generic store which can be reusable? for example:
interface BaseState {
list: []
}
interface ChildState extends BaseState {}
export default class BaseActions implements ActionTree<BaseState, BaseState>{
add(context:ActionContext, payload:BaseState){
context.commit('ADD', palyload)
}
}
export default class ChildActions extends BaseAction{
.. need to add actions only if one not available in parent class
}
or if can I create generic store which contains all (actions, mutations, getters, state)
The text was updated successfully, but these errors were encountered: