From 2bb6e39746b65cba054162a772f19de69d5c4152 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 31 Jul 2026 13:28:21 +0100 Subject: [PATCH] Add conditional use warning deeplink --- src/content/reference/react/use.md | 2 +- vercel.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content/reference/react/use.md b/src/content/reference/react/use.md index 7388efa1cee..a5187326530 100644 --- a/src/content/reference/react/use.md +++ b/src/content/reference/react/use.md @@ -662,7 +662,7 @@ This cache pattern is the foundation for [re-fetching data](#re-fetching-data-in -Don't skip calling `use` based on whether a Promise is already settled. +##### Don't skip calling `use` based on whether a Promise is already settled. {/*conditional-use*/} Unlike other hooks, `use` can be called inside conditions and loops — but it must always be called for the Promise itself. Never read `promise.status` or `promise.value` directly to bypass `use`; always pass the Promise to `use` and let React handle it. diff --git a/vercel.json b/vercel.json index 87d006def8b..2aa3316c5c0 100644 --- a/vercel.json +++ b/vercel.json @@ -174,6 +174,11 @@ "destination": "/warnings/invalid-hook-call-warning#mismatching-versions-of-react-and-react-dom", "permanent": false }, + { + "source": "/warnings/conditional-use-of-use", + "destination": "/reference/react/use#conditional-use", + "permanent": false + }, { "source": "/reference/react/directives", "destination": "/reference/rsc/directives",