Faire / mjml-react

React component library to generate the HTML emails on the fly
https://www.npmjs.com/package/@faire/mjml-react
MIT License
387 stars 17 forks source link

`react-reconciler@0.26` does not support react 18 #10

Closed Etheroit closed 1 year ago

Etheroit commented 2 years ago

Hello

Could you please bump react-reconciler for full react 18 support?

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-reconciler@0.26.2
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@">=16.8.0" from @emotion/react@11.10.4
npm WARN   node_modules/@emotion/react
npm WARN     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.10.4
npm WARN     node_modules/@emotion/styled
npm WARN     4 more (@mui/material, @mui/styled-engine, @mui/system, the root project)
npm WARN   79 more (@emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^17.0.2" from react-reconciler@0.26.2
npm WARN node_modules/@faire/mjml-react/node_modules/react-reconciler
npm WARN   react-reconciler@"^0.26.1" from @faire/mjml-react@2.1.4
npm WARN   node_modules/@faire/mjml-react
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^17.0.2" from react-reconciler@0.26.2
npm WARN   node_modules/@faire/mjml-react/node_modules/react-reconciler
npm WARN     react-reconciler@"^0.26.1" from @faire/mjml-react@2.1.4
npm WARN     node_modules/@faire/mjml-react
IanEdington commented 2 years ago

It looks like upgrading above 0.26.* causes tests to fail. We unfortunately don't use renderToJSON or renderToJSON2 so haven't run into this issue. I'd be happy to accept a PR request to fix this.

As we develop v3, we'll look to move the dependency to a peer dependency and move renderToJSON and renderToJSON2 out of the main index.js and into utils. This would remove the requirement to install react-reconciler for non-renderToJSON users, and still allow renderToJSON users to install it separately and import from the utils directory.

IanEdington commented 2 years ago

@Etheroit are you using mjml-to-json? If so what's your use-case?

Etheroit commented 2 years ago

Hi. Im not using mjml-to-json

IanEdington commented 1 year ago

This is resolved in v3.0.0 which was just released today! 🎉