JavaScript · Senior · Question 63 of 75

Why use Reflect.get(target, key, receiver) inside a Proxy get trap?

Explanation

Returning target[key] calls getters with this === target, bypassing the proxy (and its tracking). Vue's reactivity uses Reflect for this reason.

Further reading

Problem with a question

JavaScript · Senior · question 63

Test yourself

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

Take this quiz