shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
991 stars 33 forks source link

feat(render)!: `Suspense` and psuedo-async component support #71

Closed shellscape closed 11 months ago

shellscape commented 11 months ago

Component / Package Name: render

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

This PR adds support for server side rendering of Suspense and psuedo-async components.

For in-browser React compatibility, we're supporting Suspense via the useData utility, which works along side of a custom Promise wrapper. It's not likely that React's lazy is supported - it's untested and not likely to be needed for email rendering.