Jason Watmore 6/29/2023

Next.js 13 - Fix for client component ('use client') hangs when fetching data in useEffect hook

Read Original

This technical blog post details a specific bug encountered when migrating to Next.js 13's App Router. The author explains how marking a client component ('use client') as async, often a leftover from a server component conversion, can cause the browser to hang without errors when fetching data in a useEffect hook. The article provides the root cause and the fix, which is to remove the async keyword from the client component function.

Next.js 13 - Fix for client component ('use client') hangs when fetching data in useEffect hook

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week