vuera icon indicating copy to clipboard operation
vuera copied to clipboard

Usage with Vuex

Open jcampuza opened this issue 6 years ago • 3 comments

Is there any way to maintain the $store Vuex instance property that's provided by Vuex? My app is a Vue application that uses Vuex for state management, but after reaching a React component that has Vue components as children, those components no longer have access to the Vuex store.

Outside of that I'm loving it so far, very easy to integrate with presentational components that don't need access to state, I'm just running into this issue on components requiring access to global state. :)

jcampuza avatar Oct 14 '17 01:10 jcampuza

Yeah, that's something that was on my mind for a while. AFAICT, we cannot maintain React context (things like store from react-redux) through vuera, but we might be able to maintain certain Vue properties. I'll need to dig deeper into that, though.

At the moment, though, I don't see an eloquent way of doing this, since we'd essentially have to whitelist everything we wish to pass down. Vue plugins can assign arbitrary properties to Vue instances (store is one of them), and React context must be described beforehand via contextTypes.

akxcv avatar Oct 14 '17 09:10 akxcv

Any updates to this issue since 2017? Just got the same problem when trying to create a Vue SharePoint Add-In. SharePoint UI is created with react, which requires multiple hopping between Vue and React

trueleader avatar Jun 07 '19 13:06 trueleader

Sorry for such a late response. We plan to make this work if at all possible, but we need to take time to assess where things currently are and where they still need to go. Once I have that figured out, we can get some kind of plan together to address it.

cwadrupldijjit avatar Feb 04 '22 08:02 cwadrupldijjit