JavaScript Proxies

Sdílet
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...

Komentáře • 26

  • @wilmercuevas6491
    @wilmercuevas6491 Před 2 lety +5

    Nice, when I see this stuff I always try to imagine what kind of application would need this feature

  • @tahasoft1
    @tahasoft1 Před 2 lety

    Thank you, Steve. Amazing. I've been waiting for this.

  • @kaypakaipa8559
    @kaypakaipa8559 Před 2 lety

    Interesting, love the validation. Thanks again.

  • @ricardovaltierra8858
    @ricardovaltierra8858 Před 2 lety

    Thank you for that great explanation. REALLY useful

  • @chhavimanichoubey9437

    This video is really helpful tbh

  • @tech3425
    @tech3425 Před rokem

    Never thought I'd need this feature. But here I am!

  • @fernandopiolimartinez5115

    Excellent!
    Best regards from Buenos Aires!

  • @Colstonewall
    @Colstonewall Před 2 lety

    Thank you, Steve.

  • @rmnkot
    @rmnkot Před 2 lety

    Top content, as usual!

  • @tsevdos
    @tsevdos Před 2 lety

    Than you! Amazing video and explanation!!!

  • @eliwhalen604
    @eliwhalen604 Před 2 lety

    Super cool! Thank you!

  • @creatingwithcode1630
    @creatingwithcode1630 Před 2 lety

    Thank you for this.

  • @user-hs1il2rd8c
    @user-hs1il2rd8c Před rokem +1

    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.

  • @LivvieLynn
    @LivvieLynn Před rokem

    Looks like I have some refactoring to do. 😀

  • @4541047
    @4541047 Před 2 lety +1

    Hi,
    can you share your vscode settings/theme?
    I want those equality three horizontal lines instead of the ugly look of '==='.
    Thanks :)

  • @_ademmeral
    @_ademmeral Před 7 měsíci

    Sir, do you think to prepare a video/videos related to Stream API ?

  • @mykhailodmytriv7088
    @mykhailodmytriv7088 Před 2 lety

    Please give me the name of the plugin that makes such beautiful array functions)

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 2 lety

      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.

  • @MrLinuxFreak
    @MrLinuxFreak Před 6 měsíci

    so its basicly an object middleware?

  • @r0x304
    @r0x304 Před 2 lety

    first!

  • @alamir411
    @alamir411 Před rokem

    Easy To understand , Thanks