Skip to content

placeholderData called twice #1522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lahvey opened this issue Dec 25, 2020 · 3 comments
Closed

placeholderData called twice #1522

lahvey opened this issue Dec 25, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@lahvey
Copy link

lahvey commented Dec 25, 2020

Open in CodeSandbox

add this code to the example, you will see it's called twice

 { placeholderData: () => { console.log(Date.now()); } }

The doc says "This function will be executed only once"

@tannerlinsley tannerlinsley added the bug Something isn't working label Jan 9, 2021
@tannerlinsley
Copy link
Collaborator

Confirmed. We'll look into this.

@boschni
Copy link
Collaborator

boschni commented Feb 5, 2021

What if the placeholder function contains external dependencies? Do we want the placeholder data to reflect them?

@boschni
Copy link
Collaborator

boschni commented Feb 13, 2021

Fixed in the documentation

@boschni boschni closed this as completed Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants