Tommypop
Tommypop
Explore posts from servers
SSolidJS
Created by ChrisThornham on 4/7/2025 in #support
Stuck On A Build Error
I've made a PR https://github.com/solidjs/solid/pull/2466. Not sure if it's at all necessary but the change was pretty simple so thought I may as well do it and hopefully it'd prevent issues like this in the future :)
28 replies
SSolidJS
Created by ChrisThornham on 4/7/2025 in #support
Stuck On A Build Error
Yeah, I wonder if there could be a dev warning in dev if the context is undefined. Might make a PR for it and see what happens
28 replies
SSolidJS
Created by ChrisThornham on 4/7/2025 in #support
Stuck On A Build Error
Maybe something like this could work? (It's a little weird but hopefully would stop any bundling stuff breaking things) https://playground.solidjs.com/anonymous/acc9dc0a-894d-43b1-baa6-278807e84998
28 replies
SSolidJS
Created by ChrisThornham on 4/7/2025 in #support
Stuck On A Build Error
You could also do a dynamic import in onMount and store it in a signal or something (or maybe a clientOnly resource). Should have the same effect as using clientOnly for the component but might prevent any weirdness with it getting bundled on the server
28 replies
SSolidJS
Created by ChrisThornham on 4/7/2025 in #support
Stuck On A Build Error
Are you intending for the nitro preset to be nitro-prerender? I'd assume that'd solve the issue of it trying to prerender. (though obviously not if it's needed haha)
28 replies
SSolidJS
Created by Industrial on 3/6/2025 in #support
Version Mismatch?
As for using the CLI at a specific version, I think you can just do bun create [email protected]
5 replies
SSolidJS
Created by Industrial on 3/6/2025 in #support
Version Mismatch?
It always fetches the most recent template from the official SolidJS/Solid Start templates (if you're online)
5 replies
SSolidJS
Created by Industrial on 3/6/2025 in #support
Version Mismatch?
Are you referring to 0.6.1 instead of 1.1.3? If so, it's just where the CLI version is separate to the version of Solid/Solid Start
5 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
It's definitely not production ready and, afaik, there's no SSR or hydration support yet
30 replies
SSolidJS
Created by Daniel Sousa @TutoDS on 7/23/2024 in #support
Optimize image loading
let observer;
onMount(() => {
observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
setImgSrc(photo.src.small)
loadImage();
observer.unobserve(entry.target);
}
});
});
})

onCleanup(() => {
observer.disconnect();
});
let observer;
onMount(() => {
observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
setImgSrc(photo.src.small)
loadImage();
observer.unobserve(entry.target);
}
});
});
})

onCleanup(() => {
observer.disconnect();
});
14 replies
SSolidJS
Created by Daniel Sousa @TutoDS on 7/23/2024 in #support
Optimize image loading
To fix this, you could wrap your IntersectionObserver in onMount, which runs when the component is mounted to the DOM
14 replies
SSolidJS
Created by Daniel Sousa @TutoDS on 7/23/2024 in #support
Optimize image loading
In SolidStart, components run twice: once on the server, and once on the client. IntersectionObserver doesn't exist on the server, so, when the component runs on the server-side it throws an error.
14 replies
SSolidJS
Created by omfj on 7/14/2024 in #support
How do get Cloudflare bindings in dev?
4 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
(This is because vite includes types for handling the imports of *.png and i think vinxi doesn't re-export vite types correctly sometimes)
9 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
So add vite as a dev dep and add vite/client to the types field of the tsconfig
9 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
Maybe add vite types
9 replies
SSolidJS
Created by Bersaelor on 7/10/2024 in #support
Ideas what could cause static assets from failing to import?
Seems like a tsconfig issue. Are the configs the same in both projects?
9 replies
SSolidJS
Created by Deflaktor on 5/29/2024 in #support
create example solidstart project takes forever
@Deflaktor What node version are you on?
13 replies
SSolidJS
Created by valerio.tsx on 6/2/2024 in #support
Renaming Index not working?
Hmm, that might be a mistake in the docs. You should be able to bracket the put brackets round the name, (socials.tsx), if you don't want it named index
12 replies
SSolidJS
Created by valerio.tsx on 6/2/2024 in #support
Renaming Index not working?
If the filename isn't index.tsx, then the filename is used as the route suffix
12 replies