Hi,
Background: I am trying to have a website where when a user clicks on a “sport” component, a call is made to a database, and based on this information n different components appear with the teams. Then if the user clicks on any of these team components, another call to the database is made and the players appear. The information is stored in a database. I am using prisma + postgres.
Question:
I know that I will need to use client components in order to use the state hook.
Should I:
a) Use fetch() with route.ts to expose api endpoints in order to obtain the information.
b) Use a server action to access the database by calling it from a client component?
c) Pass a server component as a prop and then use that to access the database.
Thank you!
A new Vercel/Next user.