React Suspense with Next.Js

React Suspense does not working with Next.JS(i used a skeleton from shadcn/ui as a fallback)

when image is loading, there are no any skeleton
shadcn/ui is wrapper of radix ui

i tried to use to set position absoloute and z-10 to skeleton, but it does not help

  • Please provide enough code so others can better understand or reproduce the problem.

    – 
    Bot

You should provide us with more information to handle your problem.
Based on my experience with suspense, probably your problems have caused by one of these.

  • make sure data fetching placed under the suspense provider
  • if you use swr or react-query turn on suspense option
  • if css seems to be the problem, consider using create portal of React

Leave a Comment