State Management · Senior · Question 65 of 75

Why does React Redux implement useSelector on top of useSyncExternalStoreWithSelector?

Explanation

The selector runs on every store change, and the result is compared (by === or a custom equality) before React schedules a render.

Further reading

Problem with a question

State Management · Senior · question 65

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