State Management · Middle · Question 31 of 75

With pagination, how do you keep showing the previous page while the next one loads?

Explanation

A new key (['projects', page]) starts with an empty cache. placeholderData shows the previous data meanwhile, and isPlaceholderData lets you disable the "Next" button.

Further reading

Problem with a question

State Management · Middle · question 31

Test yourself

Take the State Management · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz