S
SolidJS2y ago
Max

Render as element kind

Hi, anyone know if you can render an element with a particular tag, from props for example. Maybe like react you do createElement(<tag>,...). There's Dynamic but that's no SSR right? Just to give a simple example, say you have a very nested structure layout so want some Flex component just like
const Flex = <T extends *someTagName*> (props:{tag:T}) => <*tag* style={{...*all the flex stuff*}}>{...}</*tag*>
const Flex = <T extends *someTagName*> (props:{tag:T}) => <*tag* style={{...*all the flex stuff*}}>{...}</*tag*>
There is no Solid without JSX if I remember correctly?
3 Replies
Max
MaxOP2y ago
https://github.com/solidjs/solid/tree/main/packages/solid/web think Dynamic is fine solid/web doesnt mean anything about client vs server
GitHub
solid/packages/solid/web at main · solidjs/solid
A declarative, efficient, and flexible JavaScript library for building user interfaces. - solid/packages/solid/web at main · solidjs/solid
Otonashi
Otonashi2y ago
Dynamic has a server implementation, it should work
Max
MaxOP2y ago
nice, thanks
Want results from more Discord servers?
Add your server