Since the release of React 19 and Next.js 15, we’ve observed a certain scenario with client components that can result in a page infinitely spinning and never load.
The core of this issue is marking entire Uniform components as client components with use client.
Following Next.js best practices outlined here: https://nextjs.org/docs/app/getting-started/server-and-client-components#reducing-js-bundle-size, it is likely not the best choice to mark entire Uniform components with use client. Try to push client components as far down in the tree as possible and only pass parameters from the composition to the client component that are needed to power that specific functionality. Any parameters that are passed from a server to client component will increase page size.
Scenarios
Scenario 1
Suppose you have a component that has some client functionality, simulated by this copy to clipboard button:
The whole component doesn’t have client side functionality, only the button. We can isolate this functionality by extracting the button to a new file and just passing the required parameters.
Structuring the component this way will minimize the amount of data that gets sent across the server and client boundary.
Scenario 2
If you have a component that has multiple interactive elements and there could be come dependencies between the client components, you can explore wrapping the component in a context and accessing values from it:
If all else fails and the component can not easily be reworked, pull the entire contents of the component into a new file and mark that component as use client and then use the Uniform component to just pass data to the client component:
The scenarios are presented in preference for solving this issue. The end goal is ultimately just reducing the amount of data passing between the server/client boundary.