remove unused packages deps and updates example and installation

This commit is contained in:
2020-10-09 18:03:01 +07:00
parent 575c7fea76
commit 3ec76dcb62
4 changed files with 105 additions and 564 deletions

View File

@@ -1,16 +1,15 @@
import React from "react"
import ReactDOM from "react-dom"
import { useCountdown} from "cubetiq-react-use-countdown"
import React from 'react';
import ReactDOM from 'react-dom';
import { useCountdown } from 'cubetiq-react-use-countdown';
const App = () => {
const { timeleft , start } = useCountdown()
return (
<div>
const { timeleft, start } = useCountdown();
return (
<div>
<button onClick={() => start(10000)}> Start Countdown </button>
<h1>Time left: {timeleft}</h1>
</div>
);
};
<button onClick={() => start(10000)}>Start Count down </button>
<h1>Hellos Ciybt {timeleft}</h1>
</div>
)
}
ReactDOM.render(<App /> , document.querySelector("#root"))
ReactDOM.render(<App />, document.querySelector('#root'));