t
tRPC
S
tRPC
•
3y ago
•
5 replies
sommeeeR
I want to refetch and set the inital data of an useState
Hello guys
,
currently i am retrieving the data i use in useState with
SSR
SSR
, but i want to use somethinng that makes it possible to update the useState on interactions from the user
. Im guessing I should use
useQuery
useQuery
?
How can i set it so initialData in my useState works
. this is my current useState line
:
const
[
items
,
setItems
]
=
useState
(cat.CatImage);
const
[
items
,
setItems
]
=
useState
(cat.CatImage);
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
zustand empty on inital render
V
v28 / ❓-help
4mo ago
TypeError: Cannot read property 'useState' of null
K
Khaled Maher / ❓-help
2y ago
state change does not refetch the query and the app freezes
M
Muezz / ❓-help
3y ago
How to refetch a call made on the server
N
noah / ❓-help
3y ago