|
1 | 1 | ## react-timer-hook |
2 | 2 |
|
3 | | -React timer hook is a custom [react hook](https://reactjs.org/docs/hooks-intro.html), built to handle time related logic in your react component: |
| 3 | +React timer hook is a custom [react hook](https://reactjs.org/docs/hooks-intro.html), built to handle timers(countdown), stopwatch, and time logic and state in your react component. |
4 | 4 |
|
5 | | -1. Timers (countdown timer) `useTimer` |
6 | | -2. Stopwatch (count up timer) `useStopwatch` |
7 | | -3. Time (return current time) `useTime` |
| 5 | +1. `useTimer`: Timers (countdown timer) |
| 6 | +2. `useStopwatch`: Stopwatch (count up timer) |
| 7 | +3. `useTime`: Time (return current time) |
8 | 8 |
|
9 | 9 |
|
10 | 10 | #### Note: |
@@ -147,7 +147,7 @@ export default function App() { |
147 | 147 | | minutes | number | minutes value | |
148 | 148 | | hours | number | hours value | |
149 | 149 | | days | number | days value | |
150 | | -| start | function | function to be called to start stopwatch | |
| 150 | +| start | function | function to be called to start/resume stopwatch | |
151 | 151 | | pause | function | function to be called to pause stopwatch | |
152 | 152 | | reset | function | function to be called to reset stopwatch to 0:0:0:0 | |
153 | 153 |
|
@@ -211,4 +211,4 @@ export default function App() { |
211 | 211 |
|
212 | 212 | ### Deprecation Warning: |
213 | 213 |
|
214 | | -Starting from `v1.1.0` and above default export `useTimer` is deprecated, your old code will still work but it is better to start using named exports `{ useTimer, useStopwatch }` |
| 214 | +Starting from `v1.1.0` and above default export `useTimer` is deprecated, your old code will still work but it is better to start using named exports `{ useTimer, useStopwatch, useTime }` |
0 commit comments