useSuspenseQuery halt until server action is called
Hey, server-action dummy here.
I have a query in useSuspenseQuery that I want called only when a form is filled and submited. Ideally this should all be server-components ?
https://github.com/Nsttt/nameseeker/blob/2746ec2528c3897661ffcb21937c94d3168934da/src/components/serviceList.tsx#L65
here's the code, very WIP but any help is appreciated
1 Reply
here's the server action I am calling
https://github.com/Nsttt/nameseeker/blob/2746ec2528c3897661ffcb21937c94d3168934da/src/app/page.tsx#L25
Again, not sure if I'm overcomplicating stuff, but the idea is;
- You have the query on halt.
- User fill input and sends data to url.
- Query activates and fetchs data.
Maybe I need to switch to a regular useQuery instead of useSuspenseQuery, idk