JavaScript ES6 Reflect Object

  Рет қаралды 11,710

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

Пікірлер: 40
@chesterxp508
@chesterxp508 2 жыл бұрын
Another very cool tutorial!
@nigelbrie5693
@nigelbrie5693 4 жыл бұрын
"JavaScript From The Start" I DID IT! I completed the entire series. Thank you Steve for the many hours of valuable knowledge you have given me!! Where do I go now to complete my certificate? lol
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
Lol. Now go through the JavaScript in the Browser list and the APIs and AJAX playlists. Then server-side with PHP, MySQL, Node, and Express. Then the React and React Native playlists.
@nigelbrie5693
@nigelbrie5693 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 This is so daunting! I can't imagine making this many videos let alone learning all of this. 185 on that first list!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
@@nigelbrie5693 no worries. I'll extend your deadline by a couple weeks. 🤪
@hanjelly5410
@hanjelly5410 2 жыл бұрын
Nice, thanks for this summary, just an update the latest MDN doc to delete an property is changed to `Reflect.deleteProperty()`.
@abdallaabbass4271
@abdallaabbass4271 4 жыл бұрын
Thanks very much, really you are my best teacher ❤️❤️❤️
@LR-bc8js
@LR-bc8js Жыл бұрын
Great video as usual! However, I still don't understand what's the need of Reflect when we can do everything with objects?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
Reflect typically gets used with Proxy Objects. Proxy objects can be used like a standard interface wrapped around many different objects, handling and controlling access to each object. Reflect lets you easily target the specific object that you targeting. Similar to using `this` but in a more standard way that avoids differences in scope, which would alter the value of `this`.
@LR-bc8js
@LR-bc8js Жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Make sense! Thank you!
@pronayguha7099
@pronayguha7099 6 ай бұрын
Steve, does it really add the new attribute to the object itself, or it's another copy of the same object ?
@tankbottoms-yes
@tankbottoms-yes 4 жыл бұрын
I’m trying to figure out how to keep track of a series of object transformations and data processing steps and it seems to me I could use Reflect to keep an array of functions to do these transforms and during some node-cron period call, iterate over the objects, call the Reflect object to check what transform function pointers need to be called and run them. Does this sound like a reasonable pattern?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
Reflect is not really a storage mechanism to hold lists of anything. It is a way to dynamically access an object's properties or methods. You can intercept the calls. You can delegate the calls too. Proxies also can work in combination with the reflection. I will have a video on that coming soon.
@markleodionisio2669
@markleodionisio2669 4 жыл бұрын
Thanks for sharing master.
@hmodarres
@hmodarres 2 жыл бұрын
the video didn't motivate it enough, i still don't understand how setting a "a.b" property like "a.b=3" at runtime is any less "dynamic" than doing it with Reflect
@karthickchandiran2397
@karthickchandiran2397 4 жыл бұрын
first time i am seeing this.but i didn't the purpose of this reflect.becuase we can do all the above operation with Object itself.
@aamirjamal6833
@aamirjamal6833 4 жыл бұрын
Same here.
@ProfessorSyndicateFranklai
@ProfessorSyndicateFranklai 4 жыл бұрын
It's kind of esoteric, but there is a pretty good stackoverflow answer (all the way back from 2014!) that I think addresses some key points. For most basic operations, I suspect you may never have to use it, but it's one of those niche specialist tools in your toolbox that'll make life just a little easier when you need it. stackoverflow.com/questions/25421903/what-does-the-reflect-object-do-in-javascript Basically, Reflect is good for exceptionless handling, variable constructor arguments in ES5, setting the 'this' in some function calls, and generally avoiding older and uglier code. Oh, and proxies too.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
@@ProfessorSyndicateFranklai thanks for posting this.
@meduzfr
@meduzfr 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Thank you for the link, Francis! Steve: It’s very easy to understand Reflect syntax and you explain it very well, but I think the lack of explanation about its purpose will make most people thinking that “you can do the same with Object” is the only takeaway to get here.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
@@meduzfr this video is really just a precursor to my video on proxies.
@mod7ex_fx
@mod7ex_fx 2 жыл бұрын
((:: thank you my teacher
@janduna9187
@janduna9187 3 жыл бұрын
Is the proxy video out ? I was unable to find it on his channel :(
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Not yet. :( Soon I hope.
@hamidallah
@hamidallah 4 жыл бұрын
Thank you sir
@shajanjp
@shajanjp 4 жыл бұрын
Thank you ❤️
@pandasoli6581
@pandasoli6581 2 жыл бұрын
wbu defineMetadata and setMetadata?
@johnm8358
@johnm8358 4 жыл бұрын
I don't get the use of this when I can do all that without reflect
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
See the comment by Francis Lai for the answer
@karimnassir5207
@karimnassir5207 4 жыл бұрын
Why a , b equal name and id in the object ?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
The arguments that I passed to the function was the Array generated with Reflect.ownKeys
@Youssef-lv6wp
@Youssef-lv6wp 4 жыл бұрын
First view Thanks u ❤
@nagendrapp2213
@nagendrapp2213 4 жыл бұрын
could you please create some projects using js and REact
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
I have a playlist of videos on React - kzbin.info/www/bejne/rIWph5psfpeqhKs
@nagendrapp2213
@nagendrapp2213 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 i have seen you have already a playlist But i want to you Create a some complex applications if possible could you please create some advanced Projects : )
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
@@nagendrapp2213 Please post any tutorial requests in the comments here - kzbin.info/www/bejne/gnTIq5SuZ9qBacU
@slmshady539
@slmshady539 4 жыл бұрын
Hey steve I have learnt a lot from you and would like to recommend you something, why don't add more videos to series JS Interview and make that playlist as one-stop for everything javascript.
@_Redu
@_Redu 2 жыл бұрын
Sorry but this is just trash..! You don't explain why exactly you are using the Reflect object instead of using the equilavent functionalites directly available on the subject object. I mean why exactly you need to use Reflect.get(myObject, "name") instead of myObject.name or myObject["name"]?
Promises and the allSettled Method
7:42
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 6 М.
JavaScript Proxies
22:54
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 11 М.
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 9 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
JavaScript Classes vs Prototypes
14:39
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 63 М.
Tagged Template Literals
11:11
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 11 М.
Actual use case for JavaScript PROXY!
13:09
Kevin Ghadyani - JavaScript
Рет қаралды 14 М.
ES6 Iterator & Generator Fundamentals
18:18
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 31 М.
A Practical Guide to JavaScript Proxy Objects
14:19
TomDoesTech
Рет қаралды 7 М.
Visually Understanding JavaScript Prototypes
14:58
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 55 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 829 М.
Immutability in JavaScript
15:13
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 7 М.
This is why JavaScript proxies are important
8:38
Web Dev Cody
Рет қаралды 15 М.