JavaScript Proxy




Learn how to use JavaScript Proxy by example!

MDN Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

Support me on Patreon! http://patreon.com/shama

Code examples: https://github.com/shama/letswritecode/tree/master/javascript-proxy

Original source


11 responses to “JavaScript Proxy”

  1. I really, REALLY, did like your video. You're a awesome teacher. I would suggest you to work on more real-life examples as they show the real face and power of the functionality. I mean, the array example could've been done using the prototype on plain old ECMA. You could show us a example making an API request and changing it's response to show only data we need to get, whatever.

    My like goes with you! Keep up your great work

  2. Really useful! I'll definitely do my own proxies objects, the idea of findById is very useful because there're many cases in which I end up doing the typical way to get an object like you did but in many different places, so by having a proxy like that as factory it would definitely help a lot, that's what I can see here, at the beginning I thought it was like the regular way of OOP using object.freeze etc, but I realized that's just a kind of the same way, anyway, thanks for sharing, you're doing it well and I'm following you since ~3-4 years ago (I don't remember honestly) 🙂

Leave a Reply