JavaScript Proxies
Vložit
- čas přidán 28. 07. 2021
- JavaScript has Proxy Objects that were introduced between 2012 and 2016 depending on the browser. They are like enhanced getter and setter traps that you can define and control for any object.
They can be useful for protecting and sealing object properties, for handling missing or misnamed properties and for doing validation on data.
Code from video:
gist.github.com/prof3ssorSt3v...
MDN Proxy reference:
developer.mozilla.org/en-US/d...
Nice, when I see this stuff I always try to imagine what kind of application would need this feature
Thank you, Steve. Amazing. I've been waiting for this.
Interesting, love the validation. Thanks again.
Thank you for that great explanation. REALLY useful
This video is really helpful tbh
Never thought I'd need this feature. But here I am!
Excellent!
Best regards from Buenos Aires!
Thank you, Steve.
Top content, as usual!
Than you! Amazing video and explanation!!!
Super cool! Thank you!
Thank you for this.
Great video. What is the benefit to using Reflect? Just the static methods that are defined on it? I notice its not a constructor so It looks like it only gives access to certain static methods. Is this all it does? And is it mainly used in accordance with Proxies? Ive never seen it used anywhere else. Thank you for this content. Learn something new about JS everyday.
Yeah. Generally used with Proxies as an easy way to access the object that is being passed to the proxy.
Looks like I have some refactoring to do. 😀
Hi,
can you share your vscode settings/theme?
I want those equality three horizontal lines instead of the ugly look of '==='.
Thanks :)
That is the Jet Brains Mono font
Sir, do you think to prepare a video/videos related to Stream API ?
It's on my list.
@@SteveGriffith-Prof3ssorSt3v3 Awesome
Please give me the name of the plugin that makes such beautiful array functions)
No plugins being used to create the Array.map function, just code complete with VS Code. I do have the Prettier extension that does some minor formatting of my code.
so its basicly an object middleware?
That's a good way to look at it.
first!
Easy To understand , Thanks