From 267c0f5b6fbc132f4dc9bc8d82dd22b0ddc997cf Mon Sep 17 00:00:00 2001 From: Sebastian Sebbie Silbermann Date: Tue, 14 Jan 2025 10:59:08 +0100 Subject: [PATCH] move parent vs owner into DeepDive --- src/content/reference/react/captureOwnerStack.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/content/reference/react/captureOwnerStack.md b/src/content/reference/react/captureOwnerStack.md index f5db32a6d6c..3a40aa61181 100644 --- a/src/content/reference/react/captureOwnerStack.md +++ b/src/content/reference/react/captureOwnerStack.md @@ -60,9 +60,11 @@ Outside of development builds, `null` is returned. - Owner Stacks are only available in development. `captureOwnerStack` will always return `null` outside of development. -## Owner Stack vs Component Stack {/*owner-stack-vs-component-stack*/} + -The Owner Stack is different from the Component Stack available error handlers like [`errorInfo.componentStack` in `onUncaughtError`](/reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors). +#### Owner Stack vs Component Stack {/*owner-stack-vs-component-stack*/} + +The Owner Stack is different from the Component Stack available in React error handlers like [`errorInfo.componentStack` in `onUncaughtError`](/reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors). For example, consider the following code: @@ -130,6 +132,8 @@ Neither `App` nor the DOM components (e.g. `fieldset`) are considered Owners in Neither `Navigation` nor `legend` are in the stack at all since it's only a sibling to a node containing ``. + + ## Usage {/*usage*/} ### Expanding error stacks {/*expanding-error-stacks*/}