Pomodoro Timer with React.js

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • Simple react.js project / a step by step tutorial how to create pomodoro timer with react.js
    Buy me a coffee: buymeacoffee.c...
    Source code: github.com/dej...
    Demo: reactjs-pomodo...

КОМЕНТАРІ • 47

  • @6022
    @6022 2 роки тому +4

    This is an excellent tutorial. I did get stuck at one point. I was getting an error with initialValue:false inside the useState brackets in App.js (around 14:10 on the video). The source code you provided showed me that simply putting false inside works correctly. Thank you for the great tutorial!

    • @zaidantr
      @zaidantr 2 роки тому +3

      i noticed it too. I think in the newest react you dont have to use 'initialState' again.

  • @judsonkerller2019
    @judsonkerller2019 2 роки тому

    congrats for the vídeo. i use everyday a pomodoro timer. Now, i have my personal hehehe God bless you!

  • @bandershtadt7186
    @bandershtadt7186 2 роки тому

    Great video, great explanation and great code but fell asleep ;)
    You have a voice that puts me to sleep
    So thank you for this material and good nap😅

    • @CodingWithDawid
      @CodingWithDawid  2 роки тому +2

      I think it's not about my voice. You just need more coffee when programming 😉

  • @sharadindupaul5933
    @sharadindupaul5933 3 роки тому

    Very Helpful Bro, Lots of love, from India

    • @CodingWithDawid
      @CodingWithDawid  3 роки тому +1

      Glad to hear that!
      Lots of love from Stockholm, Sweden

  • @marebot404
    @marebot404 2 роки тому

    great tutorial, the IDE gave me some headache sometimes though haha. at around 42:45 i wondered why " const percentage = Math.round(x:secondsLeft / totalSeconds) * 100" wasn't working. I had to take out the "x:" of course

  • @bobbyboxer2664
    @bobbyboxer2664 Рік тому

    Great tut. Just finished it. Nice little one day project. Thanks so much

  • @neotetra0288
    @neotetra0288 5 місяців тому

    Very helpful, thank you so much

  • @dheerajrajput5666
    @dheerajrajput5666 2 роки тому

    This was a very helpful video. Loved it

  • @chrismariolinear287
    @chrismariolinear287 2 роки тому

    `NaN` is an invalid value for the `right` css style property. I got this error, how to fix it?

  • @sergiotorres3808
    @sergiotorres3808 2 роки тому

    Excellent video, I have learned a lot 🙌

  • @martinndegwa7155
    @martinndegwa7155 Рік тому

    thank you for the video

  • @jayantverma4639
    @jayantverma4639 2 роки тому

    how to add sound when timer goes off ?

  • @mehdibouhamidi4675
    @mehdibouhamidi4675 Рік тому +1

    Please could you explain to me why state variables will not work in setIntervale and why using references instead ? 37:52

    • @gadoosher
      @gadoosher Рік тому

      Did you ever figure this out? Asking for a confused friend lmao : )

    • @cherloves2code
      @cherloves2code 10 місяців тому

      ​@@gadoosher If I understood it correctly, we need to use references with the .current because every second our tick() function is called, the setInterval would keep ticking from the initial 45 min (in seconds) every cycle instead of counting one second down from the time frame before it.
      Ex: 45:00 -->tick(-1 second) --> 44:59 but resets to setinterval of 45:00 rinse and repeat
      vs 45:00 -->tick(-1second) save 44:59 as secondsLeftRef then...
      ⌄---------------------------------------------------------------------^
      44:59 -->tick(-1second) save 44:58 as secondsLeftRef so on and so forth

    • @gadoosher
      @gadoosher 10 місяців тому +1

      @@cherloves2code thank you so much for the reply!! That makes a ton of sense 🙏🏼

  • @micaeldie8584
    @micaeldie8584 2 роки тому

    Great tuto well done

  • @moacirramos2668
    @moacirramos2668 6 місяців тому

    good

  • @apimpnamedflipflap
    @apimpnamedflipflap 2 роки тому +1

    Great video!
    what extension are you using that shows "initialState: " in useState and so on ?

  • @muhendisbagyan4069
    @muhendisbagyan4069 2 роки тому

    hey, i tried, with hours, but i didn't, can you help me?

  • @Katipanfunia20
    @Katipanfunia20 2 роки тому

    Thank you for the video! Somehow I keep getting this error message: "Module not found: Error: Can't resolve 'react-slider' in '/Users/.../my-app/src'" - do you know how to solve this? I already checked the path and the module is in the given path so I don't know what else it could be

    • @CodingWithDawid
      @CodingWithDawid  2 роки тому +1

      How does your import line look like?

    • @utkukaba
      @utkukaba 2 роки тому

      You must download react-slider. ( npm add react-slider )

  • @azanshaikh7825
    @azanshaikh7825 Рік тому

    I noticed that if I don't pass the props to the button components than it won't work. Can anyone tell me why that is?

    • @briannafoley1724
      @briannafoley1724 Рік тому

      I am also curious about this. I just came to the comments hoping to find an answer.

    • @crimebrulee
      @crimebrulee Рік тому +1

      Beginner here, someone please correct me if wrong.
      "props" allow the React components to communicate with each other, so the data can flow from a parent component to its child component(s). I understood it better when I saw someone use the example of having a HeroBanner component for a website with multiple pages. If you pass the text you want to display on the banner as a prop, you can use the HeroBanner component on every page and still have the ability to change the text to suit each page (About Us, FAQ, Services, etc.). I hope that kinda helps!

  • @everythingaboutestonia
    @everythingaboutestonia 2 роки тому

    is it possible to do it without react? i use vs code.

  • @bobbyboxer2664
    @bobbyboxer2664 Рік тому

    what font is that? So clean 😍😍

    • @CodingWithDawid
      @CodingWithDawid  Рік тому

      you mean in the app (in the browser) or in my editor?

    • @bobbyboxer2664
      @bobbyboxer2664 Рік тому

      @@CodingWithDawid My bad, yes, in the editor. It's so clean and easy to read

    • @CodingWithDawid
      @CodingWithDawid  Рік тому

      it's a free, open source font "JetBrains Mono"
      www.jetbrains.com/lp/mono/
      sorry for the late response

  • @garikmelqonyan6011
    @garikmelqonyan6011 Рік тому

    👍

  • @andresgil8330
    @andresgil8330 Рік тому

    8:05 !!!

  • @revaljq
    @revaljq 3 роки тому

    Can you provide source code?

    • @CodingWithDawid
      @CodingWithDawid  3 роки тому +3

      Sure, Code: github.com/dejwid/react-pomodoro-timer
      Demo: reactjs-pomodoro-timer.netlify.app/

  • @webcoder293
    @webcoder293 2 роки тому

    Please explain what you are typing, otherwise we can't grab what's going on over the screen😞

    • @CodingWithDawid
      @CodingWithDawid  2 роки тому

      I will try to explain more in the future

    • @CodingWithDawid
      @CodingWithDawid  2 роки тому

      Can you check my latest videos and see if i am still doing this mistake by not explaining enough? Thanks for your input