State Management · Senior · Question 4 of 75

Where should the state of a list filter (search text, sort, page) ideally live in a routed app?

Explanation

The URL is state too. Filters in ?q=&sort=&page= make links shareable and history meaningful, and loaders/query keys can derive from them. Debounce typing and replace (not push) history entries for every keystroke.

Further reading

Problem with a question

State Management · Senior · question 4

Test yourself

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

Take this quiz