-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Describe the bug
When there're query dependent, the last query:
placeholderDatanot applied until the query is fetching.isLoadingnever triggerd.
To Reproduce
online sandbox:
https://codesandbox.io/s/react-query-issue-et8hs?file=/src/index.js
I have two querys: auth, getUserDetail.
getUserDetail depends on auth.
The fetching order will be: auth -> getUserDetail.
placeholderData of getUserDetail is set to "placeholder"
- when
authis fetching, theplaceholderDataofgetUserDetailisundefined(BUG ?). - when
getUserDetailis fetching, theplaceholderDataofgetUserDetailis "placeholder" . isLoadingofgetUserDetailis never beentrue(BUG ? I want to make sure this is expect behavior.).
Expected behavior
placeholderDataapplied at start (isIdle).
Desktop (please complete the following information):
- Device: [PC]
- OS: [Win10]
- Browser: [edge(chromium)]
Additional context
danhooper, Lukasz-pluszczewski, EdmundMai, mwisnicki, mnpenner and 2 more