paint-brush
The New Next.js and SWR Clients: What You Need to Knowby@wunderstef
1,623 reads
1,623 reads

The New Next.js and SWR Clients: What You Need to Know

by Stefan Avram 8mDecember 17th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Next.js client is using fetch for making requests to the WunderGraph API, which is serving GraphQL operations over a JSON RPC style API. SWR is focused on fetching data, not updating it, and better SSR functionality. With the release of SWR 2.0RC it was time to rewrite our Next.JS client to use SWR. See what's changed and how you can use the new features in the new Next.js client. Queries no longer creates individual hooks for every operation, but instead we simply have 3 hooks, `useQuery` and `useSubscription` that are fully typed.
featured image - The New Next.js and SWR Clients: What You Need to Know
Stefan Avram  HackerNoon profile picture
Stefan Avram

Stefan Avram

@wunderstef

Co-Founder & Head of Growth at WunderGraph.

About @wunderstef
LEARN MORE ABOUT @WUNDERSTEF'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Stefan Avram  HackerNoon profile picture
Stefan Avram @wunderstef
Co-Founder & Head of Growth at WunderGraph.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite