Next.js 13: fetching

children

Client components

  • You can use a Client Component whenever you need some client-side tool or functionality: window, useState(), useEffect().
  • Fetching data from a Client Component is possible using SWR.
  • Pages and Layouts will always need to be Server Components, regardless.
In the future, it will be possible to perform native data fetching using hooks.
By