#459
react-email: renderToHtml/renderToPlainText ignore custom directives and $computed functions
renderToHtml / renderToPlainText in @json-render/react-email build a PropResolutionContext with only stateModel and repeat scope (render.tsx#L19). RenderOptions has no way to pass custom directives or $computed functions, while the React renderer supports both.
So a spec that works in <Renderer> silently renders differently as an email: { "$computed": ... } and custom $-directives are left unresolved.
Proposal: add directives?: DirectiveDefinition[] and functions? to RenderOptions and forward them into the context, same as packages/react/src/renderer.tsx.
Context: we render emails server-side from json-render specs in production. Related to #458 (directives in visibility conditions). Happy to send the PR.
Activity
0No activity yet.