Skip to content

Commit 854d705

Browse files
committed
[Doc] Improve Edit doc
1 parent 1a873b4 commit 854d705

File tree

2 files changed

+138
-85
lines changed

2 files changed

+138
-85
lines changed

docs/Create.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ You can customize the `<Create>` component using the following props:
7373
| `title` | Optional | `string`/`ReactNode`| Translation | Override the page title |
7474
| `transform` | Optional | `function` | - | Transform the form data before calling `dataProvider.create()` |
7575

76-
* You must provide either `children` or `render`.
76+
`*` You must provide either `children` or `render`.
7777

7878
## `actions`
7979

@@ -127,7 +127,7 @@ const PostCreate = () => (
127127

128128
## `children`
129129

130-
The `<Create>` component will render its children inside a `CreateContext` provider, which the `save` function. Children can be any React node, but are usually a form component like [`<SimpleForm>`](./SimpleForm.md), [`<TabbedForm>`](./TabbedForm.md), or the headless [`<Form>`](./Form.md) component.
130+
The `<Create>` component will render its children inside a [`CreateContext`](./useCreateContext.md#return-value). Children can be any React node, but are usually a form component like [`<SimpleForm>`](./SimpleForm.md), [`<TabbedForm>`](./TabbedForm.md), or the headless [`<Form>`](./Form.md) component.
131131

132132
```tsx
133133
import { Create, SimpleForm, TextInput, DateInput, required } from 'react-admin';
@@ -344,7 +344,7 @@ If you want to allow the user to enter several records one after the other, sett
344344

345345
## `render`
346346

347-
Alternatively to `children`, you can pass a `render` prop to `<Create>`. It will receive the `CreateContext` as its argument, and should return a React node.
347+
Alternatively to `children`, you can pass a `render` prop to `<Create>`. It will receive the [`CreateContext`](./useCreateContext.md#return-value) as its argument, and should return a React node.
348348

349349
This allows to inline the render logic for the create page.
350350

0 commit comments

Comments
 (0)