baxuz
baxuz
SSolidJS
Created by XxX_MLG Noob_XxX on 6/22/2024 in #support
Is the `solid-element` library still being maintained?
This works surprisingly well!
/**
* A declarative shadow root component
*
* Hooks into SolidJS' Portal's `useShadow` prop
* to handle shadow DOM and the component lifecycle
*/
const ShadowRoot: ParentComponent = (props) => {
let div: HTMLDivElement;
return (
<div ref={div!}>
<Portal mount={div!} useShadow={true}>
{props.children}
</Portal>
</div>
);
};
/**
* A declarative shadow root component
*
* Hooks into SolidJS' Portal's `useShadow` prop
* to handle shadow DOM and the component lifecycle
*/
const ShadowRoot: ParentComponent = (props) => {
let div: HTMLDivElement;
return (
<div ref={div!}>
<Portal mount={div!} useShadow={true}>
{props.children}
</Portal>
</div>
);
};
47 replies
SSolidJS
Created by sokratis on 4/30/2024 in #support
Calling root render multiple times
Considering that it's outside of render would this kind of store need to be in its own createRoot?
13 replies
SSolidJS
Created by chris on 9/12/2023 in #support
when using <Portal /> on shadow mode, on change events are not working!
3 replies
SSolidJS
Created by baxuz on 7/17/2023 in #support
Solid-Slider docs
Understandable 😄
3 replies
SSolidJS
Created by baxuz on 7/9/2023 in #support
Use ErrorBoundary inside a createRoot?
sadly that's not an option. skipped createResource and switched it to a createSignal + createEffect. Thanks anyway
4 replies
SSolidJS
Created by ringsig on 3/15/2023 in #support
Listening to all changes in an array or object in a store
Makes sense. Gotta say I'd love to see https://github.com/pmndrs/valtio ported to solidjs.
12 replies
SSolidJS
Created by ringsig on 3/15/2023 in #support
Listening to all changes in an array or object in a store
does trackStore trigger on any store updates, even if the prop isn't referenced? IE converting the store to a "dumb" createSignal for tracking purposes?
12 replies
SSolidJS
Created by ringsig on 3/15/2023 in #support
Listening to all changes in an array or object in a store
ok but why do we need trackStore? What's the difference compared to regular store prop accessing inside tracking contexts?
12 replies
SSolidJS
Created by baxuz on 5/19/2023 in #support
splitProps instead of destructuring?
Ah, so it's not a replacement for destructuring (ie flattening in my case), only splitting in different objects.
5 replies
SSolidJS
Created by ringsig on 3/15/2023 in #support
Listening to all changes in an array or object in a store
@thetarnav why are the examples there using createSignal? I thought that the point of the createStore was that it was deeply reactive, compared to simple signals.
12 replies
SSolidJS
Created by baxuz on 1/10/2023 in #support
disposing of a `createRoot` nested inside a `createEffect`?
oh. I... Did not know that.
7 replies
SSolidJS
Created by baxuz on 1/10/2023 in #support
disposing of a `createRoot` nested inside a `createEffect`?
Oh thanks a lot! It's really obscure. How come it's not returned as a value on createroot? The scope seems kinda weird
7 replies
SSolidJS
Created by baxuz on 1/10/2023 in #support
disposing of a `createRoot` nested inside a `createEffect`?
what's the dispose function?
7 replies