Skip to content

Commit 811ccbd

Browse files
Improve new key descriptions
Co-authored-by: Madeorsk <[email protected]>
1 parent 62abeea commit 811ccbd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/WithListContext.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ As a reminder, the [`ListContext`](./useListContext.md) is an object with the fo
148148

149149
## `empty`
150150

151-
Use `empty` to display a dedicated component when the related record is empty.
151+
Use `empty` to display a message when the list is empty.
152+
153+
If `empty` is not provided, the render function will be called with empty data.
152154

153155
```jsx
154156
<WithListContext
@@ -169,7 +171,9 @@ Use `empty` to display a dedicated component when the related record is empty.
169171

170172
## `error`
171173

172-
Use `error` to display a dedicated component when an error is thrown.
174+
Use `error` to display a message when an error is thrown.
175+
176+
If `error` is not provided, the render function will be called with the error.
173177

174178
```jsx
175179
<WithListContext
@@ -190,7 +194,9 @@ Use `error` to display a dedicated component when an error is thrown.
190194

191195
## `loading`
192196

193-
Use `loading` to display a dedicated component while checking for users' permissions.
197+
Use `loading` to display a loader while data is loading.
198+
199+
If `loading` is not provided, the render function will be called with `isPending` as true and no data.
194200

195201
```jsx
196202
<WithListContext

0 commit comments

Comments
 (0)