akxcv / vuera

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

Vue Provide/Inject Not Working In React #119

Open tspayne87 opened 4 years ago

tspayne87 commented 4 years ago

This might be out of the scope of this project, but it does not seem that this works for Vue components. I would like to do something like this in React by using Vue Components

import Tabs from './Tabs.vue';
import Tab from './Tab.vue';

function ReactComponent() {
  return (
    <Tabs>
      <Tab title="Tab 1">
        Some Content
      </Tab>

      <Tab title="Tab 2">
        Some Content
      </Tab>
    </Tabs>
  );
}

In the Tab component, it uses inject to get methods from the provided Tabs component. I am sure I could accomplish this by creating another Vue component that would wrap this structure, but it would be nice to be able to handle this in the React component.

cwadrupldijjit commented 2 years ago

I actually want this interoperability in this project. At the moment, I plan to assess what's outstanding and push forward with it. I'm sorry it's taken so long to get a response.