Luka
Luka
SSolidJS
Created by Luka on 11/9/2024 in #support
Suspense and dealing with large data
When I am using deferStream true it doesnt show the suspense fallbacks but as soon as I set it to false the fallbacks work well. Is it because of deferStream that suspenses dont work in my case? deferStream should be waiting for all the data until rendering the suspense so it kind of skips it I guess correct me if I am wrong. But if this is the case how can I have loading with the deferStream: true? I want to keep deferstream because of SSR. I might be completely wrong about how these work I am new to SSR and solid as well ) So here is how I fetch the data now I changed it to multiple request so I could use multiple suspenses I guess const user = createAsync(async () => { const [userData, userSkills] = await Promise.all([ get_xelosani(props.params.id), get_skills(props.params.id) ]); return { userData, userSkills }; }, { deferStream: true }); I kind of pass down data to another component like this <ProfileRight user={user} setEditingServiceTarget={setEditingServiceTarget} setModal={setModal} /> <Suspense fallback={ <p>Loading...</p> } > <p class="text-xs font-[thin-font] font-bold"> შემოუერთდა {props.user()?.userData?.creationDateDisplayable} </p> </Suspense> <section class="w-full flex"> <Suspense fallback={<div> Loading... </div>}> <SkillCarousel skills={props.user()?.userSkills?.skills}></SkillCarousel> </Suspense> </section>
5 replies
SSolidJS
Created by Luka on 11/7/2024 in #support
Server Side Rendering
Thanks a lot.
4 replies
SSolidJS
Created by Luka on 11/7/2024 in #support
Server Side Rendering
const user = createAsync(() => get_xelosani(props.params.id), {deferStream: true}) adding deferstream works so for now how I understand the ssr in solid/solidstart is when user comes to the page createAsync makes request to the server then gathers everything it needs then it inserts these data based on jsx that we have and the it hydrates it. Is this correct flow of how it works? also does createAsync run on server? for now I think it should be running on server right?
4 replies
SSolidJS
Created by Luka on 9/21/2024 in #support
Sevoral Error while using AbortController
I did it using API
9 replies
SSolidJS
Created by Luka on 9/21/2024 in #support
Sevoral Error while using AbortController
So what should I do
9 replies
SSolidJS
Created by Luka on 9/21/2024 in #support
Sevoral Error while using AbortController
I modifed the code a bit it was aborting instantly not even sending to server function here is updated code I have same sevoral error const handleFilePreview = async (file) => { setImageLoading(true) const abortController = new AbortController(); console.log(file) if (imageLoading() && !file) { abortController.abort() } console.log(abortController.signal) try { const response = await preview_image(file, props.user().profId, { signal: abortController.signal }) if (response) { batch(() => { setFile(file) setImageLoading(false) setImageUrl(response) }) } } catch (error) { console.log(error.name, error.message) if (error.name === "AbortError") { return setImageLoading(false) } } }
9 replies
SSolidJS
Created by Luka on 9/21/2024 in #support
Sevoral Error while using AbortController
It is throwing sevoral error in this case it might be because of way I send signal but I think that should be syntax in this case
9 replies
SSolidJS
Created by Luka on 9/16/2024 in #support
Abort server function
Thanks a lot I will try it soon.
3 replies
SSolidJS
Created by Luka on 9/11/2024 in #support
Hydration problem?
I fixed it thanks for support it was a little different than props I had importing problems and things.
7 replies
SSolidJS
Created by Luka on 9/11/2024 in #support
Hydration problem?
Actually I had an old commit I reverted back to that and I spotted the differences between one that had no issue and one that had I will fix it soon i think
7 replies
SSolidJS
Created by Luka on 9/11/2024 in #support
Hydration problem?
@Madaxen86 What would be better approach
7 replies
SSolidJS
Created by Luka on 9/11/2024 in #support
Hydration problem?
Particularly Xelosani folder has some problems because the above issue only happens when I am on route /xelosani/id
7 replies
SSolidJS
Created by Luka on 6/17/2024 in #support
Sevoral
Thanks a lot, the websites you have linked to your profile are dope.
9 replies
SSolidJS
Created by Luka on 6/17/2024 in #support
Sevoral
I will ask you another question about cache function, I do understand keys and revalidating but I want to know when I revalidate the cache key does it only run function on server? or does it fetch from client as well?
9 replies
SSolidJS
Created by Luka on 6/17/2024 in #support
Sevoral
I fix seroval errors easily but I just used JSON.stringify on server and then parsed it on the client. but I wanted to know more about it. I really typed Sevoral LoL. Thanks @Brendonovich, I am working with mongodb so it might be giving me error because of ObjectId's and other types.
9 replies
SSolidJS
Created by Luka on 6/15/2024 in #support
Busboy "missing content-type" error
@peerreynders Hey thanks for help I updated npm cleared caches and it works.
4 replies
SSolidJS
Created by Luka on 6/15/2024 in #support
Busboy "missing content-type" error
It works I do get the headers as object but busboy has this type of check which should be pass it without error but it still throws the error module.exports = (cfg) => { if (typeof cfg !== 'object' cfg === null) cfg = {}; if (typeof cfg.headers !== 'object' cfg.headers === null || typeof cfg.headers['content-type'] !== 'string') { throw new Error('Missing Content-Type'); } return getInstance(cfg); };
4 replies
SSolidJS
Created by Luka on 6/7/2024 in #support
How does serializing work
It works thanks
3 replies
SSolidJS
Created by Luka on 6/4/2024 in #support
FileRoutes layout
Thanks @REEEEE
18 replies
SSolidJS
Created by Luka on 6/4/2024 in #support
FileRoutes layout
I just wrapped the notification component code into the Account component and it works but I don't really know if this is recommended, as long as it works lol.
18 replies