Improved notes

This commit is contained in:
Arjun Mahishi
2018-12-27 15:51:40 +05:30
parent 889ac4ff15
commit 49285ae1b8

View File

@ -2,7 +2,11 @@
Renders a timer component. Renders a timer component.
The timer state is initially set to zero. When the `Tick!` button is clicked, `timer` is incremented periodically at the given `interval`. The `setInterval` is cleared once the desired `time` is reached. `time` and `interval` are the required props. - The timer state is initially set to zero
- When the `Tick!` button is clicked, `timer` is incremented periodically at the given `interval`
- When the `Reset` button is clicked, the value of the timer is set to zero and the `setInterval` is cleared
- The `setInterval` is cleared once the desired `time` is reached
- `time` and `interval` are the required props
```jsx ```jsx
class App extends Component { class App extends Component {