#data fetching2

1 messages · Page 1 of 1 (latest)

winter copperBOT
#

Hi @granite trellis. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the provided code, both the SearchPage and SearchResults components will run on the client-side. The data fetching in the SearchResults component is done directly within the component, which means it will be executed on the client-side during runtime.

If you want to fetch data on the server-side, you can use getServerSideProps in your page file. However, the provided code does not include getServerSideProps, so the current implementation will run on the client-side.

For more information on server-side rendering and data fetching, you can refer to the Next.js documentation on getServerSideProps (https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: