Is this possible to render a component as string in browser context ?

Hello, I saw in the discord that its impossible to use renderToString in the borwser. Is there another way to render to a string a SolidJS component ? Instead of using pure template string ?
5 Replies
lxsmnsyc
lxsmnsyc2y ago
.outerHTML should work
Carere
Carere2y ago
I don't understand what you mean by that
lxsmnsyc
lxsmnsyc2y ago
(<div>Hello World</div>).outerHTML
Carere
Carere2y ago
wow, juste huge thx For TS user, we need to type the JSX as follow:
((<div>Hello World</div>) as HTMLElement).outerHTML
((<div>Hello World</div>) as HTMLElement).outerHTML
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View