#427

fix(codegen): emit string props as JSX expressions

Openlahfirwants to merge intofrom
  1. serializeProps() put strings in quoted JSX attributes, so quotes made the JSX invalid and backslashes and newlines changed the value.
  2. String props are now emitted as JSX expressions like title={"..."}, and the examples in the docs match.
  3. Fixes #379.

Co-authored by @KennyMcSimpson, based on #383.

Before

The generated JSX fails to build for a label with quotes, and the page shows backslashes, newlines and & as different text.

https://github.com/user-attachments/assets/eaa796b5-cbc2-4b3d-a1e8-927a2cd064cd

After

The same labels build, and the page renders each one exactly as written.

https://github.com/user-attachments/assets/966d1b37-04ea-4f81-a912-0863d90bd941

Activity

4
vercel[bot]20d ago

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
json-render ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-chat-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-dashboard-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-game-engine-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-image-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-no-ai ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-react-email-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-react-pdf-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-react-three-fiber-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-remotion-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-solid-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-svelte-chat-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-svelte-demo ReadyPreview, v0Oct 23, 2026 5:45pm UTC
json-render-vue ReadyPreview, v0Oct 23, 2026 5:45pm UTC
ctateapproved changes20d ago