File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @react-email/render " : patch
3
+ ---
4
+
5
+ accept React.ReactNode instead of React.ReactElement
Original file line number Diff line number Diff line change @@ -48,11 +48,8 @@ const readStream = async (
48
48
return decoder . decode ( mergedChunks ) ;
49
49
} ;
50
50
51
- export const render = async (
52
- element : React . ReactElement ,
53
- options ?: Options ,
54
- ) => {
55
- const suspendedElement = < Suspense > { element } </ Suspense > ;
51
+ export const render = async ( node : React . ReactNode , options ?: Options ) => {
52
+ const suspendedElement = < Suspense > { node } </ Suspense > ;
56
53
const reactDOMServer = await import ( 'react-dom/server' ) ;
57
54
58
55
let html ! : string ;
Original file line number Diff line number Diff line change @@ -5,11 +5,8 @@ import { plainTextSelectors } from '../shared/plain-text-selectors';
5
5
import { pretty } from '../shared/utils/pretty' ;
6
6
import { readStream } from './read-stream' ;
7
7
8
- export const render = async (
9
- element : React . ReactElement ,
10
- options ?: Options ,
11
- ) => {
12
- const suspendedElement = < Suspense > { element } </ Suspense > ;
8
+ export const render = async ( node : React . ReactNode , options ?: Options ) => {
9
+ const suspendedElement = < Suspense > { node } </ Suspense > ;
13
10
const reactDOMServer = await import ( 'react-dom/server' ) ;
14
11
15
12
let html ! : string ;
You can’t perform that action at this time.
0 commit comments