Architecture help for search page
Unanswered
African Slender-snouted Crocodil… posted this in #help-forum
African Slender-snouted CrocodileOP
Hello, I would like some help w/ designing a search page that has two components: a search bar and a search results lists. I have already the docs for searching and paginations on Next.js's website. However my SearchBar component uses some useQuery hooks which causes issues w/ fetching the user.
For instance, instead my SearchBar, I have 3 buttons, one of which, gets the user folders and lets the user add the search query a folder. However whenever this query is run, the user is returned null.
For instance, instead my SearchBar, I have 3 buttons, one of which, gets the user folders and lets the user add the search query a folder. However whenever this query is run, the user is returned null.
5 Replies
Roseate Spoonbill
To help you, we need a bit more detail
- is backend api for react query in the next app, or external?
- do you use tRPC?
- Can we see source code for the search bar?
- Can we see source code for backend api if it is in next?
- Can does the query run when you open network tab in chrome dev tools?
- is backend api for react query in the next app, or external?
- do you use tRPC?
- Can we see source code for the search bar?
- Can we see source code for backend api if it is in next?
- Can does the query run when you open network tab in chrome dev tools?
@Roseate Spoonbill To help you, we need a bit more detail
- is backend api for react query in the next app, or external?
- do you use tRPC?
- Can we see source code for the search bar?
- Can we see source code for backend api if it is in next?
- Can does the query run when you open network tab in chrome dev tools?
African Slender-snouted CrocodileOP
Thank you for replying.
- I use Convex - https://www.convex.dev/. It's inside the app.
- No, I use Convex.
- Sure. I'm still working on it so the code is quite messy. I'll send it in my next message.
- Sure.
- Since it uses Convex, the query is not logged in my network tab.
- I use Convex - https://www.convex.dev/. It's inside the app.
- No, I use Convex.
- Sure. I'm still working on it so the code is quite messy. I'll send it in my next message.
- Sure.
- Since it uses Convex, the query is not logged in my network tab.
Roseate Spoonbill
I am not familiar with convex, so forgive me for guessing. Have you tried setting things up with the convex guide for tanstack query? https://docs.convex.dev/client/tanstack-query. It might be important as convex has some additional wrapper in those examples. Also, I think react query api changed a bit and I am not sure if direct callback still works. Again, sorry for guessing, but this is simply what I would check if I had these issues. Maybe someone else here will prove more useful.
@Roseate Spoonbill I am not familiar with convex, so forgive me for guessing. Have you tried setting things up with the convex guide for tanstack query? https://docs.convex.dev/client/tanstack-query. It might be important as convex has some additional wrapper in those examples. Also, I think react query api changed a bit and I am not sure if direct callback still works. Again, sorry for guessing, but this is simply what I would check if I had these issues. Maybe someone else here will prove more useful.
African Slender-snouted CrocodileOP
Thank you, I'll try this approach.