[Solved] How to use precompile TSX transform
Hi! I'm trying to use https://deno.com/blog/v1.38#fastest-jsx-transform .
Configured everything and it works. However, I don't understand how to properly do rendering before sending result to the client. Currently I'm doing
but I guess there should be some Deno-native option which I don't know about.
2 Replies
What you're doing is already the Deno native solution. Deno is based on web standards so return a
Response
instance with the html string (+ setting appropriate content type headers) is the way to go
Rendering with the jsx precompile
transform works the same way as without it from a user perspective. The main difference is how JSX is transpiled behind the scenes and that's where all the benefits are coming fromGot it, thanks for the explanation.