Michael Jackson - Composing Behavior in React or Why React Hooks are Awesome

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024
  • github.com/mja...

Комментарии • 13

  • @SaSha-hb5rq
    @SaSha-hb5rq 3 года назад

    Good talk, now I can really grasp the concept of middleware

  • @sagivbengiat6190
    @sagivbengiat6190 5 лет назад +8

    MJ is great, as always

    • @EricBishard
      @EricBishard 5 лет назад +2

      I really enjoyed his and Tylers talk! Hooks Hooks Hooks...

    • @uidotdev
      @uidotdev 5 лет назад

      @@EricBishard ❤️

  • @adamdreier
    @adamdreier 3 года назад

    Amazing that my campus director works for him.

  • @mattmazzola
    @mattmazzola 4 года назад +2

    Great video!
    Seeing this pattern of composing hooks and clarity of explanation by MJ reminded me of his previous video explaining benefits of "render prop" pattern to as opposed to mixins or HoC. See: ruclips.net/video/BcVAq3YFiuc/видео.html
    Also I noticed he frequently did common code refactors and wanted to remind viewers who use VSCode the manual steps can be reduced. They have suggested refactor actions to extract selected code as method which reduce need to keep moving cursor and speeds up development.
    Example, creating custom hook from existing set of hook code.
    Create component A that uses native hooks to achieve behavior. You creating component B that would also benefit from behavior. You decide to make a custom hook and move code from A to a function so it can be used it A and B. This is now action to do this operation for you:
    code.visualstudio.com/docs/editor/refactoring#_extract-method
    (although I noticed it doesn't always preserve indentation and semicolons)

  • @electronicaamigusto
    @electronicaamigusto 5 лет назад

    Made my day!

  • @tonybrown7847
    @tonybrown7847 5 лет назад

    that was awesome!

  • @adebiyial
    @adebiyial 3 года назад

    Nice.

  • @hussainshaik4390
    @hussainshaik4390 5 лет назад +1

    but is not it over complicating things just like higher-order components?

    • @DrewSpencer
      @DrewSpencer 3 года назад +1

      I believe hooks are designed to remove the need for higher-order functions and render props. Happy days!

  • @harshitjoshi3082
    @harshitjoshi3082 3 года назад

    which theme is that ?