vuera icon indicating copy to clipboard operation
vuera copied to clipboard

ReactDOM.createPortal instead of ReactDOM.render

Open osi-oswald opened this issue 6 years ago • 5 comments

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?

osi-oswald avatar Oct 16 '17 15:10 osi-oswald

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.

akxcv avatar Oct 17 '17 13:10 akxcv

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

thany avatar Dec 01 '22 12:12 thany

Hi, I'd like to work on this.

another-strange-cat avatar Dec 10 '22 13:12 another-strange-cat

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

cwadrupldijjit avatar Jul 21 '23 05:07 cwadrupldijjit