Skip to content

Commit

Permalink
[doc] [no ci] Add video tutorial to useRecordContext chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto authored and mjarosch committed Jul 1, 2024
1 parent c8bd9d0 commit 4829269
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/useRecordContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ title: "useRecordContext"

`useRecordContext` grabs the current record. It's available anywhere react-admin manipulates a record, e.g. in a Show page, in a Datagrid row, or in a Reference Field.

<iframe src="https://www.youtube-nocookie.com/embed/YLwx-EZfGFk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="aspect-ratio: 16 / 9;width:100%;margin-bottom:1em;"></iframe>

## Usage

The most common use case for `useRecordContext` is to build a custom field. For instance, an author field for a book Show view.
Expand Down

0 comments on commit 4829269

Please sign in to comment.