How to JSX to string? #3278
Answered
by
nakasyou
refinedkontrol
asked this question in
Q&A
-
Hello, I am looking for a way to convert from Hono JSX ( Example use case: I'm using SVG in JSX to generate several variations of a logo (different colors, padding, stroke width). I'd like to be able to write the SVG string to a file. I am aware of the SSG helper functions (https://hono.dev/docs/helpers/ssg), but I'm wondering if there's a more straightforward way. Thank you for Hono! Best HTML templating system I know of! |
Beta Was this translation helpful? Give feedback.
Answered by
nakasyou
Aug 22, 2024
Replies: 1 comment 1 reply
-
@refinedkontrol const svg = <svg><title>SVG</title></svg>
const text = await svg.toString() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
refinedkontrol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@refinedkontrol
Try