SolidJSS
SolidJSโ€ข2y agoโ€ข
14 replies
Blankeos

Dynamic imports?

Is there a similar straightforward approach to import modules dynamically in SolidJS?

In Svelte it's as simple as:
onMount(async () => {
 const myModule = await import("my-module");
})

// Which is pretty much equivalent to in a regular ESM import:
import MyModule from "my-module";


It helps with non-ssr-friendly module imports. I was wondering if SolidJS has something similar? :))
image.png
Was this page helpful?