Skip to content

Commit

Permalink
move parent vs owner into DeepDive
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 14, 2025
1 parent 6f983c3 commit 267c0f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/content/reference/react/captureOwnerStack.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*/}
<DeepDive>

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:

Expand Down Expand Up @@ -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 `<SubComponent />`.

</DeepDive>

## Usage {/*usage*/}

### Expanding error stacks {/*expanding-error-stacks*/}
Expand Down

0 comments on commit 267c0f5

Please sign in to comment.