Skip to content
Discussion options

You must be logged in to vote

Is it something like a bug?

it is not. placeholderData runs through select, just like data returned from your queryFn - so whatever you put into placeholderData must have the same structure. TypeScript would catch something like this.

so if you extract data.data in select, it means that your placeholderData must also look like that:

placeholderData: {
  data: {
    list: [],
    totalElements: null
  },
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@buglessir
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by buglessir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants