tachyon-ops / react_vue_ts

Vuera TS lib
22 stars 2 forks source link

Call React methods from Vue #3

Closed juanparati closed 1 year ago

juanparati commented 1 year ago

I used vuera-ts integrating some React components into Vue and it works great passing properties and listening events however how can I call methods that uses "useRef" from Vue?

In Vue normally we call methods from a child component with something like this.$ref.childComp.mymethod().

juanparati commented 1 year ago

@nmpribeiro : I found that is not possible to call the methods without the internal reference to the React Component, so I improved vuera-ts with a proxy method that will provide the internal reference.

See: https://github.com/nmpribeiro/vuera-ts/pull/4

tachyon-ops commented 1 year ago

@juanparati thanks for contributing. I will have a look at the PR :)

tachyon-ops commented 1 year ago

@juanparati should be ready to use with version 1.0.7. Thanks for your contribution!