0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

react-timer-hookを使った話

Posted at

react-timer-hookでカウンターを作るとき、「second」の値は60秒を超えることがないので、以下のようなコードで60秒を超過した表現ができる

const totalSeconds(のような変数) = minutes * 60 + seconds;

また、カウントをリセットするとき、カウントを停止しておくには、以下のようなコードで簡単にできる。

restart(****, false);

このようにrestartをfalseにするだけ。

誰かの役に立ちますように。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?