I have a file server.cljs that uses express to serve. I am squint run ning and it has a function like this:
(defn component [req] #html [:p (:name req.query)])
The result from that call looks like this when printed:
Html { s: '<p>Bob</p>' }
If I send that with (.send res result) it doesn't do what I want (which is for the browser to receive "<p>Bob</p>") but rather sends a JSON object with the "s" key because Express sees the object I guess. Is this expected behaviour that I'm required to unpack the actual HTML from the "s" key in the object? The examples I see on the squint repo suggest I am doing something wrong but I can't figure it out.Call str on it
I should update the examples
you should "finalize" the html using str
this mechanism exists to avoid double encoding of nested html stuff
Ahh great, thanks!
Good luck with your talk tomorrow @felix.kauppi.alm! https://x.com/borkdude/status/1836012706500882453
Felix, if you can get me a Squint sticker back to Stockholm, that would make me super happy!
I'll have to negotiate with Michiel but I'll try to make it happen
Take as many as you want at the CT booth!
Man i would love to get one. How can i get one of these
@mathaeus.peter.sander DM me your address, I'll send you some