Next.js Discord

Discord Forum

SSR rendering

Answered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
Avatar
African Slender-snouted CrocodileOP
@Arinji Hey sir, coming with a continuation of that topic πŸ˜‚
1. I have to fetch some data based on a template
2. I fetch the data based on that template ( but since there is a lot of data im using pagination to go through it ) so at first im fetching only 30 things.
MENTION: The fetched data is not inside a single object, Im fetching from multiple collections ( firebase ) so I will get as a return 5 objects
3. The data I fetched will be displayed in Tabs, each tab having it own searchBar and pagination, how can I do that? Server-Side?
the thing is that the collections are super big, and I want a fast searching and filtering without "search button" interaction and without pagination on button but rather an infinite scrolling pagination, im currently using meilisearch for those collections to be able to search through them fast. How can I fetch the data in this case in the most efficient way?
Answered by Arinji
awesome
View full answer

10 Replies

Avatar
Not sure what you mean on how can I do that @African Slender-snouted Crocodile
Avatar
African Slender-snouted CrocodileOP
Like, how can I implement the searching and fetching to be independent on each tab? without having to re-fatch all the other tabs as well, and also not pass a different searchParam for each tab, but rather just 1 searchParam called "SearchTerm" and apply it to the current tab
Avatar
uh
i wouldnt use the url for this case, just.. use client components at this point lol
or
what you could do
yea.. no clue, if you were fine with storing each tab data in the url, go for it
Avatar
African Slender-snouted CrocodileOP
I managed to get that, by setting inside the url an identifier such as "selector_type" and based on the opened modal, im fetching data based on the selector_type with same params
Avatar
awesome
Answer
Avatar
African Slender-snouted CrocodileOP
but then there are so many other issues that comes in πŸ˜‚ πŸ˜‚ you can move to https://nextjs-forum.com/post/1328691080383823893 to see my next issue πŸ˜‚