akxcv / vuera

:eyes: Vue in React, React in Vue. Seamless integration of the two. :dancers:
MIT License
4.3k stars 241 forks source link

Usage with Vuex #15

Open jcampuza opened 7 years ago

jcampuza commented 7 years ago

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. :)

akxcv commented 7 years ago

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.

trueleader commented 5 years ago

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

cwadrupldijjit commented 2 years ago

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.