musiclover
How to use JSX.HTMLAttributes<HTMLDivElement>?
import type { Component, JSX } from 'solid-js'
export const LeeCenter:Component<JSX.HTMLAttributes<HTMLDivElement>> = p =>
(
<div
{...p}
class={
flex justify-center items-center ${p.class}}
>
{p.children}
</div>
)
I want to make kind of wrapper of div.
Is this ok? it seems working.4 replies
Solid App to Web Component (js file)
I'm making a single page app in solid and Vite.
Can I build my entire solid component to Web Component (single js file) ?
I don't want to change each component to web component, i have a lot of components.
Should I change each component to web component manually?
11 replies
How to re-render <Portal> if target component is removed or added?
I want to use <Portal> with id to dynamically insert component to other component.
The problem is the target component (mount) can be also dynamically removed or added.
What should I do in this case?
I found the <Portal> component is not rendered after re-adding target component after removing it.
3 replies
Is solid-realworld example really real world?
I'm trying to follow the pattern solid-realworld uses.
But the state management is really confusing me.
Other made a same question like me. https://github.com/solidjs/solid-realworld/issues/20
It's even not typescript.
Where can I see true real world example?
4 replies