No video

How to use Proxy Objects - JavaScript Tutorial

  Рет қаралды 31,711

dcode

dcode

Күн бұрын

Пікірлер: 32
@ricardopassos1180
@ricardopassos1180 3 жыл бұрын
I barely understand English, but your way of explaining the Proxy API is by far the best I've found
@dcode-software
@dcode-software 3 жыл бұрын
That's awesome to hear!
@luisdwq123
@luisdwq123 3 жыл бұрын
I was having a hard time understanding proxies, your explanation really helped thanks :)
@dcode-software
@dcode-software 3 жыл бұрын
You're welcome and thanks for the Twitter follow!
@licokr
@licokr Жыл бұрын
Awesome, easy and clear. Thank you for the video!
@hanjelly5410
@hanjelly5410 3 жыл бұрын
Crystal clear and easy to understand!
@dcode-software
@dcode-software 3 жыл бұрын
Awesome
@user-ie7md3mm6x
@user-ie7md3mm6x 2 жыл бұрын
Thank you so much. You're channel is being very helpful on couple topics for me. Subbed + liked
@yinonelbaz5309
@yinonelbaz5309 2 жыл бұрын
Crystal clear and easy to understand
@nathoud7166
@nathoud7166 2 жыл бұрын
very clear and understanbable 👍
@VladdyHell
@VladdyHell Жыл бұрын
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
@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.
@oleksandrparnekov1371
@oleksandrparnekov1371 Жыл бұрын
Good explanation. Thanks.
@jmmmmmmmmmk
@jmmmmmmmmmk 7 ай бұрын
Thx good video
@dangerdoctor920
@dangerdoctor920 2 жыл бұрын
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
@abhishekmg2451
@abhishekmg2451 2 жыл бұрын
Awesome video !!! very clear
@ashiqdey
@ashiqdey Жыл бұрын
awesome man
@jeetanshusrivastava2155
@jeetanshusrivastava2155 Жыл бұрын
Thanks!
@eren_korkmaz
@eren_korkmaz 2 жыл бұрын
best. thank you
@alex-dk2rj
@alex-dk2rj 2 жыл бұрын
Proxies underrated
@intykatgames
@intykatgames 2 жыл бұрын
METATABLES IN JAVASCRIPT!!! HECK YEAHHHH
@dhruvshah7783
@dhruvshah7783 2 жыл бұрын
Nice!
@rafaelmrantunes
@rafaelmrantunes 3 жыл бұрын
Very nice video. Btw, which font is this?
@gatty.
@gatty. 3 жыл бұрын
Might be Open Sans
@BroccoliColdbrew
@BroccoliColdbrew 7 ай бұрын
Like this video❤
@FordExplorer-rm6ew
@FordExplorer-rm6ew 4 жыл бұрын
Where to store secrets? like a keys.js file?, ideal / best practices? For production mostly
@troooooper100
@troooooper100 4 жыл бұрын
why not just use class with private fields?
@erykczajkowski8226
@erykczajkowski8226 3 жыл бұрын
My guess is this proxy thingy seems to have more 'traps' than class, which has just two - set and get?
@user-yk1lz7gb2t
@user-yk1lz7gb2t 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
@fatkhurohmana5937
@fatkhurohmana5937 4 ай бұрын
useImmer bring me here
@souravhemachandran5298
@souravhemachandran5298 3 жыл бұрын
Wow, guy just types with his mouse
@lawaldare
@lawaldare 4 жыл бұрын
First comment!!!👊🏿
Actual use case for JavaScript PROXY!
13:09
Kevin Ghadyani - JavaScript
Рет қаралды 12 М.
JavaScript Proxy
18:36
Kyle Robinson Young
Рет қаралды 21 М.
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 19 МЛН
白天使选错惹黑天使生气。#天使 #小丑女
00:31
天使夫妇
Рет қаралды 15 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 42 МЛН
Why JavaScript Devs are Switching to Rust in 2024
10:35
warpdotdev
Рет қаралды 256 М.
Что такое ПРОКСИ в JavaScript (Proxy)
10:11
Веб-разработка - DevMagazine
Рет қаралды 10 М.
How to use Generator Functions in JavaScript - Tutorial
18:47
Top 10 Javascript One Liners YOU MUST KNOW!
14:16
developedbyed
Рет қаралды 194 М.
JavaScript Proxies
22:54
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 11 М.
The Ultimate Guide to JavaScript Collections
24:52
Bran van der Meer
Рет қаралды 2,8 М.
JavaScript Memory Leaks and How To Fix Them
14:58
Software Developer Diaries
Рет қаралды 26 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 19 МЛН