vuex-simple icon indicating copy to clipboard operation
vuex-simple copied to clipboard

nuxt context combined inject

Open hartmut-co-uk opened this issue 5 years ago • 2 comments

I'm submitting a ... [ ] bug report [x] feature request [ ] question about the decisions made in the repository [x] question about how to use this project

Summary When using vuex-simple with nuxt - the store has to be integrated via 'classical mode' https://nuxtjs.org/guide/vuex-store/#classic-mode see https://github.com/sascha245/vuex-simple/issues/12 First issue: the classical mode is deprecated for Nuxt 3 Second issue: nuxt provides 'combined inject' for its store modules https://nuxtjs.org/guide/plugins#combined-inject which allows to define & inject objects/functions into SFC & the vuex store, used e.g. by the axios-plugin to access the configured axios instance in module actions this.$axios.

So not sure what my question really is :-) I'm not necessarily expecting all of those nuxt specific issues solved by vuex-simple - but as it's a really nice project I'd love to use it with nuxt... so I wanted to start a discussion on how nuxt support could be improved vs. just highlight the limitations I run into with the current state (2.1.0).

(I might be able to provide an example app in a few days once the nuxt <> TS support has been finalised)

hartmut-co-uk avatar Dec 20 '18 00:12 hartmut-co-uk

Hi @hartmut-co-uk,

I would be quite interested in adding more support for nuxt, so I am open to any ideas you might have. Concerning the classic mode, as it has been deprecated, does that mean that only the modules mode will be available in the future?

Anyway, I will have to test out multiple things for both points you pointed out, though I won't be able to do anything for now as my PC broke down today...

sascha245 avatar Dec 20 '18 17:12 sascha245

I guess there should be a custom plugin for nuxt. I have also spent a lot of time integrating too different DI technologies in one project (I am talking about inject() and vue-typedi)

You can read more here: https://github.com/sascha245/vue-typedi/issues/2

sobolevn avatar Jun 24 '19 11:06 sobolevn