baxuz
baxuz
SSolidJS
Created by baxuz on 7/17/2023 in #support
Solid-Slider docs
Hey @davedbase 🙂 Looking at the repository, I wonder what the details in the createSlider destructuring is used for. Doesn't seem to be reactive. Was wondering where I could get the length of initialized slides.
3 replies
SSolidJS
Created by baxuz on 7/9/2023 in #support
Use ErrorBoundary inside a createRoot?
I'm using a pattern where I have a globally accessible resource on a createRoot:
export const [solidStore, updateSolidStore] = createRoot(() => {
const [myResource] = createResource(
{
licenseKey: import.meta.env.VITE_LICENCE_KEY,
},
resourceCreator
);
export const [solidStore, updateSolidStore] = createRoot(() => {
const [myResource] = createResource(
{
licenseKey: import.meta.env.VITE_LICENCE_KEY,
},
resourceCreator
);
However the resourceCreator can error out, crashing the entire application with it. Is there a way to handle this inside a createResource?
4 replies
SSolidJS
Created by baxuz on 5/19/2023 in #support
splitProps instead of destructuring?
How does splitProps work exactly?
export const ResultDisplay: Component<{ result: Result }> = (props) => {
const [res] = splitProps(props, ["result"]);
export const ResultDisplay: Component<{ result: Result }> = (props) => {
const [res] = splitProps(props, ["result"]);
In this case it's absolutely the same if I write splitProps(props, ["result"]); or splitProps(props, []);. I just get props. I know I can use:
const result = () => props.result;
const result = () => props.result;
But I'm not sure how splitProps works.
5 replies
SSolidJS
Created by baxuz on 1/10/2023 in #support
disposing of a `createRoot` nested inside a `createEffect`?
I am creating a nested effect, like:
createEffect(() => {
// create nested effect
createRoot(() => {
createEffect(() => {
// ...
createEffect(() => {
// create nested effect
createRoot(() => {
createEffect(() => {
// ...
Will the root be automatically disposed when the scope of the first createEffect gets disposed? How can I inspect that?
7 replies