1.11.1 • Published 5 years ago
@cubetiq/react-use-countdown v1.11.1
React Countdown Hook
Installation
# NPM
npm i @cubetiq/react-use-countdown
# Yarn
yarn add @cubetiq/react-use-countdownExample
import React from 'react';
import ReactDOM from 'react-dom';
// import the countdown hook here
import { useCountdown } from 'cubetiq-react-use-countdown';
const App = () => {
const { timeleft, start } = useCountdown({
step: 1000,
});
return (
<div>
<button onClick={() => start(10000)}>Start Countdown</button>
<h1>Time left: {timeleft}</h1>
</div>
);
};
ReactDOM.render(<App />, document.querySelector('#root'));Contributors
Project's repository: React Countdown
1.11.1
5 years ago
1.11.0
5 years ago
1.10.9
5 years ago
1.10.8
5 years ago
1.10.7
5 years ago
1.10.6
5 years ago
1.10.5
6 years ago
1.10.4
6 years ago
1.10.3
6 years ago
1.10.2
6 years ago
1.10.1
6 years ago
1.10.0
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago