Veaury React 19 Strict mode bug
React 19 introduced the double-invoking ref functions in StrictMode, as mentioned in this link: https://react.dev/reference/react/StrictMode#fixing-bugs-found-by-re-running-ref-callbacks-in-development.
This feature seems to cause Veaury to unmount the applyPureVueInReact components immediately after they are mounted.
Here’s a stack trace for the unmounting event, which clearly shows that the unmount is caused by the double invocation of ref cleanups.
\
A potential location where the issue might be occurring is this link: https://github.com/gloriasoft/veaury/blob/60948b58c21b7e2f5900628d1b0569a24d3c97a2/src/applyVueInReact.js#L198-L199
In this section of the code, we can see that in the componentWillUnmount method, we remove a Vue portal. However, since both the componentWillUnmount method and the ref callback(https://github.com/gloriasoft/veaury/blob/60948b58c21b7e2f5900628d1b0569a24d3c97a2/src/applyVueInReact.js#L149) (as mentioned in the previous link) are invoked, Veaury unmounts the component.
having the similar issue. Have a react app and using applyPureVueInReact to hang some legacy vue components and none of them load when using react19, but wasn't seeing any error message to indicate what was going wrong.
"react": "^19.1.0",
"vue": "^3.2.45",
"veaury": "^2.6.1",
@MrFlashAccount Thanks for tracking that down, did you have to do something to trigger those messages? wondering why ours was failing silently.
@samselfridge-cnc we've added some console.error in the installed package.
We've had to disable the StrictMode for now...