lars
Explore posts from serversSolidJS UI library + Astro
Hey, would anyone happen to have experience using a UI library together with Astro?
I can get it working if I just export some simple components, but if I then add an import to another SolidJS library (eg.
@kobalte/core
or @ark-ui/solid
to help build my primitives), then I run into:
At first I was using tsup
with tsup-preset-solid
, but at this point I’ve tried almost everything I can think of: rollup, vite, esbuild, or just plain tsc. On the other hand, tried a bunch of different Astro configs, but no matter what I do I can’t get past this error.
Are there any example projects with such a setup somewhere?30 replies
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:
3 replies
Losing reactivity in props passed to `children` callback
I've got a component
Field
that passes a memo to props.children
. I'm running into an issue where the child component is not updating on changes to the memo
It works totally fine if I instead have several memos though:
a downside with the working example is having to pass in all props explicitly instead of just spreading em (ie. {...fieldState}
) 😬
how come the reactivity is lost? is there a way to preserve reactivity + still being able to spread the props?2 replies
updating a tree of nodes in a SolidJS store
hey y'all. i'm trying to build a tree view where nodes have an
isExpanded
state
i'm having a tough time trying to update the corresponding node. below is the approach i've tried but it doesn't trigger a component update for whatever reason. if there's a totally different way to do this, then i'm all ears
4 replies
Monorepo error with SolidStart `__vite_ssr_import_0__.template is not a function`
I've got a shared UI library (compiled into esm + cjs with vite) that is used with both a regular SolidJS app and a SolidStart app. It's working fine in the SolidJS app, but when importing the lib in the SolidStart app, I'm getting a pretty cryptic error:
7 replies