Introducing: Solid-Socket
Building Realtime Apps Is Easy Again!
Just mark a file with "use socket", and write your code just like a regular client-side app
(#SolidHack 2024 entry, please vote!)
@Mr_Chonky@TkDodo@aryan__deora That’s the issue, I can’t have it thrown during ssr haha otherwise i wouldn’t have even tweeted that. I need to set the error state without throwing the actual error. Solid query currently doesn’t handle errors thrown during ssr and it causes the state to freeze
@TkDodo is there a way i could return an error via a query function rather than throwing it.
queryClient.setError(…)
Or
createQuery(()=> queryError(new Error(…));
The reason being, i have an app in production using Solid Query, however there is a bug when throwing on ssr
@TkDodo@aryan__deora This is my query
const q = createQuery(()=> {
return {
queryFn: ()=> {
try {
throw Error(…)
} catch {
// how do i set q.error to he this error
}
}
})
@TkDodo@aryan__deora I need a way to actually set the error state without it being thrown (during ssr solid query currently does not handle errors correctly).
So assuming i have a query function, what is the best way to set the error state on it considering the function provided does not throw
I think queryError is a better approach tho and shouldn’t be hard to implement either, its just handling both queryError in addition to throws in the same way
Votes for the 2024 @solid_js Hackathon are now live.
https://t.co/G5qon0vKBP
I made 2 submissions (2 different categories).
Best SolidStart App:
https://t.co/ngIFaG3ltC
Best Ecosystem Utility:
https://t.co/bMg70Wal98
@balazsorban44@authjs
Meh, your gh issues automatically close my issues due to lack of information so i will just @ you here to lyk
https://t.co/TGtDpUqF5E
@pusher how do i update a watchlist without re-authenticating the user?
We first get initial watchlist on page loads
Then i want to add a new id to the watchlist after certain action
@jullerino@TkDodo Having this in addition to the current api is great, so devs can choose the api they want - and still having all the features you mentioned in the RFC, or stick to the old one because they don’t notice the issues you mentioned on daily basis
@jullerino@TkDodo IMO, this feels like going back in time. I think tRPC is an amazing project that changed how we write code nowadays, but the reasons you mentioned doesn’t justify to make the api worse (not actually bad but compared to where we got now).
Having this in addition is great