Myvideo

Guest

Login

Vercel wants you to fetch data like this

Uploaded By: Myvideo
2 views
0
0 votes
0

In this video, we take a look at the major update to Vercel’s hooks for data fetching called useSWR, which is now in version two. The new useSWR mutation hook allows for updating data on the frontend before receiving word back from the server, making the application feel snappier. We can also use the new preload function to load data as soon as the JavaScript module comes into scope. The useSWR hook now also includes a newly added isLoading state, which triggers only once when loading data. The release also improves React 18 support and includes a migration guide for existing useSWR 1.0 users. While it’s difficult to say whether it may replace TanStack Query, useSWR is a great option to consider for data fetching in React-based applications. SWR: TanStack Query: ht ... #MattPocock #typescript #web_development #advanced_typescript 20221211 0tR89PcQRAc

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later