single-spa / single-spa-react

Single-spa lifecycles helper for React applications
https://single-spa.js.org/docs/ecosystem-react.html
MIT License
226 stars 63 forks source link

Default renderType should vary based on react version #202

Closed joeldenning closed 9 months ago

joeldenning commented 9 months ago

The default renderType is createRoot, but that doesn't seem to work with the https://react.microfrontends.app example that's using React 17. To fix, possibly update the getRenderType function to do some react version checks?

https://github.com/single-spa/single-spa-react/blob/57f84557c5bf2d49260ec1770e19bd482c83547a/src/single-spa-react.js#L39

https://github.com/single-spa/single-spa-react/blob/57f84557c5bf2d49260ec1770e19bd482c83547a/src/single-spa-react.js#L219