I started to learn NextJS and I finihsed the tutorial.
I pulled the final result of the example from final-example repo on github. I want to test Suspense
effect without loading.tsx
, so I deleted loading.tsx
under app > dashboard > (overview)
, and also add 5 seconds delay to fetchRevenue
call in app > lib > data.js
:
However, when I click “Home” on side menu, Suspense
does not work. The dashboard page just freezed until the server finishes fetching data. I expect the dashboard page is loaded immediately when I click “Home” on side menu and the revenue card shows loading status.
Here is the recorded video:
https://imgur.com/YamjkId
I searched for answeres online but cannot find any… did I missing anything?