init
This commit is contained in:
16
example/src/index.js
Normal file
16
example/src/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from "react"
|
||||
import ReactDOM from "react-dom"
|
||||
import { useCountdown} from "cubetiq-react-use-countdown"
|
||||
|
||||
const App = () => {
|
||||
const { timeleft , start } = useCountdown()
|
||||
return (
|
||||
<div>
|
||||
|
||||
<button onClick={() => start(10000)}>Start Count down </button>
|
||||
<h1>Hellos Ciybt {timeleft}</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
ReactDOM.render(<App /> , document.querySelector("#root"))
|
||||
Reference in New Issue
Block a user