Learn about React HOOKS by creating a Counter App (with a twist)!

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Lots of video tutorials out there still teach using class-based components. In this tutorial, we will be creating a counter app by using hooks: specifically the useState hook and the useEffect hook. We will also deep dive into some of the nuances of using useEffect.
    If you are getting started on React, but still want to learn more about hooks, then this video is for you!
    🗄 Resources:
    Github Repo: github.com/ang...
    Download Node.js: nodejs.org
    🔑 Key Concepts:
    - React
    - Hooks
    - useState
    - useEffect
    #React #Hooks #useState #useEffect #Counter

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

  • @AngleCoding
    @AngleCoding  4 года назад

    hey guys, check out the finished code here! github.com/angle943/counter-app-hooks

  • @h.kubilay6160
    @h.kubilay6160 4 года назад

    justin you are great. please keep teaching.

  • @Elator11777
    @Elator11777 4 года назад

    Thank you Justin, glad I found your channel!

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

    Great tutorial Justin,
    I have a question though, to resolve the NaN issue, isn't better to just give the input a type of number ?
    Please let me know your thoughts, I'm a beginner and just trying to understand if this idea would work or if not, why not.
    Thank you

  • @miklosnemeth8566
    @miklosnemeth8566 4 года назад +1

    Absolutely excellent demo hooks instructional application and video. As you did with the tic tac toe, I'd go and add TypeScript type definitions to it to make this a professional looking app, at the same time I'd make it a PWA, thereafter, deploy it on Azure, Google, Heroku, wherever, to get a free HTTPS source, which is essential for PWAs, then I'd show how to deploy on mobile phones. That would be an excellent series. Just an idea to make this simple example shine in the context of a full development workflow.

  • @AM-nm6ts
    @AM-nm6ts 2 года назад

    thank youuuuuuu

  • @frank3481
    @frank3481 4 года назад

    Is it ok to start learning hooks without being good at React class?

    • @AngleCoding
      @AngleCoding  4 года назад +1

      김경현 Frank Yes! The official react team endorses using functional components over class based components. In my opinion, the only benefit to learn class-based components these days is only to be able to work with legacy code. So yes I highly encourage getting good with hooks, and later when you have time you can check out class based componwnts