jsx-email icon indicating copy to clipboard operation
jsx-email copied to clipboard

Support React 19

Open osdiab opened this issue 1 year ago • 1 comments

  • Component or Package Name: jsx-email
  • Component or Package Version: all

Feature Use Case

use Next 15 RC, which requires React 19

Feature Proposal

loosen the peer dependency on react/react-dom to allow 19, do any testing necessary to make sure it still works

osdiab avatar May 24 '24 04:05 osdiab

Thanks for the issue. When react is out of the release candidate phase we'll begin support for it.

shellscape avatar May 24 '24 12:05 shellscape

Going to close this for now since React 19 is still in release candidate stage.

shellscape avatar Sep 14 '24 21:09 shellscape

Bumping this as Next 15 was officially released as stable and production-ready despite React 19 not being out of RC.

osdiab avatar Oct 29 '24 07:10 osdiab

Awfully irresponsible of Next.js.

Have you tried jsx-email with React 19?

shellscape avatar Oct 29 '24 11:10 shellscape

React 19 is finally out of the RC fase.

Will it be a lot of work to support it?

valourus avatar Dec 06 '24 13:12 valourus

Hallelujah, finally. We've looked at it a few times and it didn't look too bad. Will make this a priority. @lordelogos do you have any bandwidth to look at this?

shellscape avatar Dec 06 '24 13:12 shellscape

Additionally I found that the preview server doesn't work at all, just shows a white screen if you use React 19.

So, basically if you're using the latest version of NextJS, then this library is incompatible. Seems high priority to get it working.

osdiab avatar Dec 24 '24 05:12 osdiab

Seems high priority to get it working.

We all have families. I have children and a regular job. And we're in the middle of the holidays. I'd humbly suggest avoiding language like that.

What this project thrives on is the awesome contributions of users, since this project was founded by users, not just a VC-backed company using it for marketing a product. I'd encourage you to consider contributing a fix for React 19 in the meantime.

shellscape avatar Dec 24 '24 05:12 shellscape

Got it, sorry.

For what it's worth it in my set-up, our email templates are in a different workspace package in our monorepo, so I just put React 18 on that sub package so that the preview server works, and then use React 19 as usual in our app where the emails will be rendered and sent.

It seems the emails are being rendered properly regardless of the newer React version, so it's probably just that the preview server is incompatible.

osdiab avatar Dec 24 '24 06:12 osdiab

Your work is very much appreciated. In the mean time I had to figure something out. So I ended up just use react 18 to render the mails while my rest of my app is using React 19 with next 15.1.0. Works fine for now.

this is my file structure.

├── src
│   ├── app - nextjs app
│   └── mails 
│       ├── templates (folder with the mail templates)
│       └── package.json (with react ^18)
└── package.json (with react 19 + next)

Take your time with the update, more important to get it right :+1:

valourus avatar Dec 30 '24 10:12 valourus

please follow #275 for updates on this. we're nearly ready to merge, and only need to configure some tests to run. that should be done today. very much appreciate everyone's patience on this.

shellscape avatar Jan 06 '25 15:01 shellscape