glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
612 stars 79 forks source link

reactR upgrade React to `18.2.0` #340

Closed timelyportfolio closed 8 months ago

timelyportfolio commented 8 months ago

@glin I would like to upgrade React to 18.2.0 in reactR https://github.com/react-R/reactR/pull/81. I consider reactable the most critical dependent of reactR, so I will wait to proceed with pull/upgrade until I hear from you. Thanks so much for your dedication to and hard work on reactable.

glin commented 8 months ago

Seems to work just fine! Thanks for the heads up and continuing to maintain reactR. I got some deprecation warnings when upgrading to React 18 in the repo to run tests, but they've kept compatibility with React 17, so not a real problem.

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

I will probably do the React 18 upgrade here once reactR is updated on CRAN, then add a dependency on that and migrate the API uses.

And side note, the warning is because of some newer features that use server-side rendering and the separate react-dom/server package. I've been bundling that in reactable because these features are still experimental, so at some point I'll open a reactR issue to ask for the server bundle to be included to keep versions consistent. But at least for now, the React APIs have been stable enough that there doesn't seem to be any issue mixing a React 17 server with a version 18 client.

timelyportfolio commented 8 months ago

@glin thanks very much for checking and the very helpful and thorough additional thoughts Let me know if there is ever anything I can do to help.

Happy to add the server bundle. Just say the word.