You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using renderToStream() for SSR but renderTags() returns a string which ends up getting escaped. Is there a way to have something like renderTags() but have it return JSX?
The text was updated successfully, but these errors were encountered:
The problem is how it gets inserted. Returning JSX doesn't really work for us because JSX doesn't really exist for us at runtime. So the way to insert it is either directly in the HTML string if you have it top level or, if inserting in Solid's JSX wrap it in an ssr call. It basically treats it like an already escaped template.
This is exported from solid-js/web. So you probably want to run this code in server only context (ie guarded by isServer or eqivalent). That being said the tags aren't there until the server finishes rendering so to make it work in the JSX you probably need to use something like useAssetsfromsolid-js/web` anyway. Which is why I didn't expect to see this issue as none of these APIs are documented so I figured most people would just be inserting their markup in an HTML string at the end where you wouldn't have to worry about escaping.
In any case I hope these hints help. SolidStart is also a good reference here.
I'm using renderToStream() for SSR but renderTags() returns a string which ends up getting escaped. Is there a way to have something like renderTags() but have it return JSX?
The text was updated successfully, but these errors were encountered: