Manually mounting SolidJS component within HTML component via `render`
I'm on an adventure of doing some truly weird shit. I'm parsing YAML and dynamically creating HTML and inserting SolidJS components based on the
template
properties below:
(The user is the one who writes the YAML and runs the app, so it doesn't matter if it's insecure and dangerous)
How I'm getting this to work currently:
2 Replies
pt2
The
parseTemplate
fn is where the real magic happens. It compiles the template with Handlebars (a templating engine), and then afterwards SolidJS components are mounted into the compiled HTML
The issue I'm facing is that the manually mounted SolidJS components don't seem to be "wired up" correctly. Their onCleanup
hooks aren't being called.
Is there a correct way to insert the SolidJS components in the parsed HTML rather than just calling render()
?There is
hydrate
, but I think it looks for hydration markers produced by ssr