OrJDev

320 posts

OrJDev

OrJDev

@OrJDevv

OSS and @solid_js

Beigetreten Ekim 2022
47 Folgt972 Follower
OrJDev retweetet
Dev Agrawal
Dev Agrawal@devagrawal09·
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!)
Dev Agrawal tweet media
English
12
10
254
32.7K
OrJDev retweetet
goosewin
goosewin@Goosewin·
hackathons
goosewin tweet media
English
17
334
8K
251.7K
OrJDev
OrJDev@OrJDevv·
Meh how can such a big product like Pusher not support basic necessities in WS.
OrJDev tweet media
English
0
0
0
136
OrJDev
OrJDev@OrJDevv·
Is there anyone from @pusher that can answer a question? Or if is anyone familiar with it
English
1
0
0
239
OrJDev
OrJDev@OrJDevv·
@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
English
0
0
1
50
OrJDev
OrJDev@OrJDevv·
@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
English
3
0
2
578
OrJDev
OrJDev@OrJDevv·
@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 } } })
English
1
0
0
107
OrJDev
OrJDev@OrJDevv·
@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
English
1
0
0
111
OrJDev
OrJDev@OrJDevv·
@TkDodo So if i do that, what should i return to the query function. Can i return new Error(..) I assume that won’t be cached correctly if i do that?
English
1
0
1
153
Dominik 🔮
Dominik 🔮@TkDodo·
@OrJDevv You can grab the query from the cache and I think `setState` is a public method so you can put it in error state
English
1
0
1
163
OrJDev
OrJDev@OrJDevv·
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
English
0
0
1
103
OrJDev
OrJDev@OrJDevv·
@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
English
0
0
0
13
Julius
Julius@jullerino·
@OrJDevv @TkDodo Can you write this on the RFC itself? Twitter threads get lost
English
1
0
3
70
Dominik 🔮
Dominik 🔮@TkDodo·
tired: useQuery custom hooks wired: queryOptions abstractions
Dominik 🔮@TkDodo

@housecor @AArdvarkErick queryOptions is really good because it allows you to use the same "config" for multiple use- cases: useQuery(productOptions) useSuspenseQuery(productOptions) queryClient.prefetchQuery(productOptions) useQueries({ queries: [ productOptions, todoOptions] })

English
10
6
210
40.3K
OrJDev
OrJDev@OrJDevv·
@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
English
1
0
2
92
OrJDev
OrJDev@OrJDevv·
@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
English
1
0
2
124