Data fetching is a core part of any application. This page goes through how you can fetch, cache, and revalidate data in React and Next.js.
There are four ways you can fetch data:
On the server, with fetch
On the server, with third-party libraries
On the client, via a Route Handler
On the client, with third-party libraries.