I barely understand English, but your way of explaining the Proxy API is by far the best I've found
@dcode-software3 жыл бұрын
That's awesome to hear!
@luisdwq1233 жыл бұрын
I was having a hard time understanding proxies, your explanation really helped thanks :)
@dcode-software3 жыл бұрын
You're welcome and thanks for the Twitter follow!
@licokr Жыл бұрын
Awesome, easy and clear. Thank you for the video!
@hanjelly54103 жыл бұрын
Crystal clear and easy to understand!
@dcode-software3 жыл бұрын
Awesome
@Dan-p7f2 жыл бұрын
Thank you so much. You're channel is being very helpful on couple topics for me. Subbed + liked
@yinonelbaz53092 жыл бұрын
Crystal clear and easy to understand
@VladdyHell2 жыл бұрын
What are some of the good uses for it? As far as I can think of is default configurations for your app, e.g. default Express configurations like ports, etc. defined in a JSON format.
@ozzyfromspace Жыл бұрын
I wrote a little utility that allows me to perform array-like operations on an object (iterate in loops, push, pop, etc.) Using a proxy to achieve this ended up helping helping me account for unexpected user behaviors (eg. otherwise it's hard to catch a user running a push on what I deem a tuple in a runtime context). That's my little use case from earlier today. The world's second most popular typescript framework, VueJS, is also based on proxies. Turns out proxies are really good for setting up guardrails for how people use code, so if you can "prove" that users will write reasonably safe code, you can become more aggressive about state-management techniques. Vue's state model is better at surgical updates than say, React, because of the library's extensive use of Proxies (among other architectural innovations). Hope you found this response enlightening. Best wishes mate. - Oz.
@nathoud71663 жыл бұрын
very clear and understanbable 👍
@oleksandrparnekov1371 Жыл бұрын
Good explanation. Thanks.
@abhishekmg24513 жыл бұрын
Awesome video !!! very clear
@dangerdoctor9202 жыл бұрын
I wrote exactly like you did but it gives an error Uncaught TypeError: 'set' on proxy: trap returned falsish for property 'difficulty' on line 309
@jmmmmmmmmmk11 ай бұрын
Thx good video
@ashiqdey2 жыл бұрын
awesome man
@intykatgames2 жыл бұрын
METATABLES IN JAVASCRIPT!!! HECK YEAHHHH
@jeetanshusrivastava2155 Жыл бұрын
Thanks!
@alex-dk2rj2 жыл бұрын
Proxies underrated
@eren_korkmaz2 жыл бұрын
best. thank you
@rafaelmrantunes3 жыл бұрын
Very nice video. Btw, which font is this?
@gatty.3 жыл бұрын
Might be Open Sans
@dhruvshah77832 жыл бұрын
Nice!
@BroccoliColdbrew10 ай бұрын
Like this video❤
@troooooper1004 жыл бұрын
why not just use class with private fields?
@erykczajkowski82263 жыл бұрын
My guess is this proxy thingy seems to have more 'traps' than class, which has just two - set and get?
@اشکانمحمدی-ز1ث2 жыл бұрын
I believe that the use case demonstrated in this video was not a good example of a proxy. The real use case is when you want to perform some extra work behind the scenes that is not directly related to the object itself. For example you might want to save the game settings object in a SQL db, Redis cache, document cookies or local storage or etc... You might want to listen to the changes in the game settings properties and send them over an external API to sync the changes across the player's devices and so on and so forth ... None of these tasks are directly related to the gameSettings object. The purpose of the game settings object is to just represent the settings and control how you set or get them, it's not meant to have the implementation logic for syncing settings across devices or saving them to a storage. Proxies provide a better way to handle these situations
@FordExplorer-rm6ew4 жыл бұрын
Where to store secrets? like a keys.js file?, ideal / best practices? For production mostly