Skip to content

Commit d6058fe

Browse files
authored
Apply suggestions from code review
1 parent a89fc12 commit d6058fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: docs/react/guides/migrating-to-v5.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ const {
186186

187187
There are some caveats to this change however, which you must be aware of:
188188

189-
- `placeholderData` will always put you into `success` state, while `keepPreviousData` will give you the status of the previous query. That status could be `error` if we have data fetched successfully and then got a background refetch error. However, the error itself is not shared. This doesn't seem quite right in any case. Therefore we decided to stick with behavior of `placeholderData`.
190-
- `keepPreviousData` will give you the `dataUpdatedAt` timestamp of the previous data, while with `placeholderData`, `dataUpdatedAt` will stay at `0`. This might be annoying if you want to show that timestamp continuously on screen. However you might get around it with `useEffect`.
189+
- `placeholderData` will always put you into `success` state, while `keepPreviousData` gave you the status of the previous query. That status could be `error` if we have data fetched successfully and then got a background refetch error. However, the error itself was not shared, so we decided to stick with behavior of `placeholderData`.
190+
- `keepPreviousData` gave you the `dataUpdatedAt` timestamp of the previous data, while with `placeholderData`, `dataUpdatedAt` will stay at `0`. This might be annoying if you want to show that timestamp continuously on screen. However you might get around it with `useEffect`.
191191

192192
```ts
193193
const [updatedAt, setUpdatedAt] = useState(0)

0 commit comments

Comments
 (0)