akxcv / vuera

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

ReactDOM.createPortal instead of ReactDOM.render #17

Open osi-oswald opened 7 years ago

osi-oswald commented 7 years ago

Did you already try the new ReactDOM.createPortal as replacement for ReactDOM.render?

The benefits would be to have only 1 react app for all ReactInVue components (instead of N reacts apps, one for each ReactInVue component). Also one would be able to define a single react context to be used by all ReactInVue components. Maybe this will have some (positive) impact on your planned Benchmark #16?

akxcv commented 7 years ago

Yeah, I’ve been thinking about that for a long time. I haven’t thought about preserving context this way, though, thanks for the idea! I believe we can achieve similar effect for Vue components via Vue slots. But I would still like to benchmark the library first.

thany commented 1 year ago

It's a good idea to revive this issue because of that error that now appears in the browser console:

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

another-strange-cat commented 1 year ago

Hi, I'd like to work on this.

cwadrupldijjit commented 1 year ago

In theory, yes. I might need to revisit this a bit. I might include it in my updates to this package.