Nikita Shtimenko
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Nikita Shtimenko on 12/29/2023 in #questions
Vite, React, useQuery, API, Streaming
Hey, guys!
I am new here and i a junior.
I was curious if anyone can give me an advice on one question (React, useQuery, Streaming).
Lets say you have some amount of data that you need to pull from backend, when you load the page (like posts, news, list of user profiles, etc... does not really matter). The point is its more than 1 type of data.
Currently i have custom hook for page itself and for data types (in order not to bloat the page itself).
But, i also need to do the checks with isLoading for every data type, because Suspense does not work if i just pass the (for some time) undefined data into component.
So how you deal with this situation? I dont want to have x*data isLoading checks and it is a little pain to destructure all that.
5 replies
TTCTheo's Typesafe Cult
•Created by Nikita Shtimenko on 11/28/2023 in #questions
Bottom Navbar
3 replies