James4u
James4u
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
but again, you may not need isLoading state
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
Yeah, they seems to be correct
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
you need to pass more fitler values when you hit this endpoint, right?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
const result = await getAdoptPost({
query: { page },
});
const result = await getAdoptPost({
query: { page },
});
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
so before you hit the api, here
const result = await getAdoptPost({
query: { page },
});
const result = await getAdoptPost({
query: { page },
});
you can get query params from the url, right?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
or was it your original question?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
btw why don't you pass filter params to the api so that you can use them when you get data from prisma?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
and also
const [isPending, startTransition] = useTransition();
const [isPending, startTransition] = useTransition();
you have isPending - why you need another state for the loading state? setIsLoading(false); // Set loading to false after data is fetched
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
not a deal breaker but you can use server side data fetching if you are using app router
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
hmm you are doing client side data fetching
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
oh sorry couldn't see the noti - give me some time
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
and file extension
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
3 `
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
nonpe
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
No description
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
show me the code
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
using prisma
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
and where do you fetch data?
88 replies
PPrisma
Created by tom_bombadil on 7/22/2024 in #help-and-questions
Dynamic Filtering items with prisma and Nextjs?
don't need to set states in the submit handler
88 replies