SIGN IN SIGN UP

[flags] Enable conditional `use()` warning in React's Canary builds (#37491)

The warning was previously only enabled for experimental builds
(`react@experimental`). This enables the warning for `react@canary` as
well.

Keep in mind that conditional `use()` is generally supported. This
warning only triggers if the condition is based on `promise.status` (or
`promise.value`). Let `use()` handle that status. React will not suspend
if the `promise.status` is already `'fulfilled'`.

More information can be found in the [`use()` docs under "Don’t skip
calling use based on whether a Promise is already
settled."](https://react.dev/reference/react/use#conditional-use).

We've tested this at Vercel on the latest version of SWR (which
previously had conditional `use()` calls) and found no false-positive
warnings or excessive warnings.
S
Sebastian "Sebbie" Silbermann committed
0d69e20fc03a7b2c750c3245d0ad19fb8e6f3b30
Parent: 8f00437
Committed by GitHub <noreply@github.com> on 9/2/2026, 3:47:16 PM