FutureLights
FutureLights
Explore posts from servers
DDeno
Created by FutureLights on 10/19/2024 in #help
Deno Compile Exe doesn't run
Thanks for the clarification.
6 replies
DDeno
Created by FutureLights on 10/19/2024 in #help
Deno Compile Exe doesn't run
So if I'm understanding this right, native node modules can't be used with compile? I'd assume any deno equivalents, if they exist would work?
6 replies
SSolidJS
Created by FutureLights on 4/24/2023 in #support
Wrap each child
Thanks! Would I be correct in assuming that everything needs recalculated for every new child?
11 replies
SSolidJS
Created by FutureLights on 1/15/2023 in #support
Solid JS force rerender on signal change
That makes sense. setTimeout has been working consistently for me and I don't see it having a big impact performance.
4 replies
SSolidJS
Created by FutureLights on 1/13/2023 in #support
Context In Typescript
Well at least it was an easy fix. Yeah. That was confusing. Thank you!
20 replies
SSolidJS
Created by FutureLights on 1/13/2023 in #support
Context In Typescript
It's ts lol. tsx fixed it. Thanks
20 replies
SSolidJS
Created by FutureLights on 1/13/2023 in #support
Context In Typescript
It works in the playground just fine, which is great, but doesn't help my problem. I've downloaded the project and it's fine in VSCode. I'm trying to make sure that everything lines up between my two projects.
20 replies
SSolidJS
Created by FutureLights on 1/13/2023 in #support
Context In Typescript
20 replies
SSolidJS
Created by FutureLights on 1/13/2023 in #support
Context In Typescript
I can't replicate the error in the playground so it must be something with my configuration. Is there anyway to see what configuration the playground is using? I'm just using the default template from Solid JS without any major changes.
20 replies
SSolidJS
Created by FutureLights on 1/12/2023 in #support
Set Timeout Example
Ok, so I figured it out, and you were right. The issue isn't in the code above. I was wrapping each of my images with a component. When I cut that out and just used an img the warning went away, Not really for sure why, but it is officially gone. Thanks for your help!
14 replies
SSolidJS
Created by FutureLights on 1/12/2023 in #support
Set Timeout Example
Uncommenting didn't fix it. My error is probably somewhere else then. The trace goes there first and the error appears every time the interval fires. It might have something to do with my images. Thanks for your help.
14 replies
SSolidJS
Created by FutureLights on 1/12/2023 in #support
Set Timeout Example
It is declared in a component. Sorry I should have specified.
export const SmallProject: Component<{
...
}> = (props) => {

const [activeImageIndex, setActiveImageIndex] = createSignal(0);

const transition = () => {
setActiveImageIndex(prev => ++prev % props.images.length);

setTimeout(() => {
transition();
}, random(4000, 7000));
}

onMount(() => {
setTimeout(() => transition(), random(4000, 7000));
});

return <div
class={style.SmallProject}
>
<div class={style.Images}>
<For each={props.images}>
{(image, i) => <div
class={css(style.Image, activeImageIndex() === i() && style.Active)}
>{image}</div> }
</For>
</div>
</div>
}
export const SmallProject: Component<{
...
}> = (props) => {

const [activeImageIndex, setActiveImageIndex] = createSignal(0);

const transition = () => {
setActiveImageIndex(prev => ++prev % props.images.length);

setTimeout(() => {
transition();
}, random(4000, 7000));
}

onMount(() => {
setTimeout(() => transition(), random(4000, 7000));
});

return <div
class={style.SmallProject}
>
<div class={style.Images}>
<For each={props.images}>
{(image, i) => <div
class={css(style.Image, activeImageIndex() === i() && style.Active)}
>{image}</div> }
</For>
</div>
</div>
}
14 replies
SSolidJS
Created by FutureLights on 1/12/2023 in #support
Set Timeout Example
The exact code for that is
const [activeImageIndex, setActiveImageIndex] = createSignal(0);

const transition = () => {
setActiveImageIndex(prev => ++prev % props.images.length);

setTimeout(() => {
transition();
}, random(4000, 7000));
}

onMount(() => {
setTimeout(() => transition(), random(4000, 7000));
});
const [activeImageIndex, setActiveImageIndex] = createSignal(0);

const transition = () => {
setActiveImageIndex(prev => ++prev % props.images.length);

setTimeout(() => {
transition();
}, random(4000, 7000));
}

onMount(() => {
setTimeout(() => transition(), random(4000, 7000));
});
14 replies
SSolidJS
Created by FutureLights on 1/12/2023 in #support
Set Timeout Example
Yes, ty. In my app web I try that I get this message dev.js:736 computations created outside a 'createRoot' or 'render' will never be disposed. Any ideas on why? I have a similar structure to my example above.
14 replies
SSolidJS
Created by FutureLights on 12/26/2022 in #support
Better way of reusing event listeners for hooks
Your probably right. It is much more concise and readable.
4 replies
SSolidJS
Created by FutureLights on 12/25/2022 in #support
EPERM operation not permitted, rmdir
Ah got it, it's under the three dots
11 replies
SSolidJS
Created by FutureLights on 12/25/2022 in #support
EPERM operation not permitted, rmdir
Sure, just clicking the green check mark does that right?
11 replies
SSolidJS
Created by FutureLights on 12/25/2022 in #support
EPERM operation not permitted, rmdir
My file structure is like websites/solidjs/project-name and for react it is websites/react/project-name, but I don't have this issue for all my SolidJS projects, just like two or three so far out of many. I think I'll just copy the critical files over to another folder and delete the rest. That should fix my issue. Thanks for your help!
11 replies
SSolidJS
Created by FutureLights on 12/25/2022 in #support
EPERM operation not permitted, rmdir
@brendan_csel Thanks! I have tried that without any luck. That is an idea, I've already tried giving "everyone" full control to node_modules without success, I didn't think about the parent. I created it using the npm create template command. I know it's not the official way anymore, I just haven't dedicated any time to learning the new way. I didn't have any issues until I tried to fix my issues with vite hmr so I'm guessing its something I did with that somehow.
11 replies