An analog clock for your React app.
npm install eval-react-clock !downloads 
npm install eval-react-clock or yarn add eval-react-clock.
import Clock from 'eval-react-clock'.
.
npm install eval-react-clock or yarn add eval-react-clock.
tsx
import { useEffect, useState } from 'react';
import Clock from 'eval-react-clock';
function MyApp() {
const [value, setValue] = useState(new Date());
useEffect(() => {
const interval = setInterval(() => setValue(new Date()), 1000);
return () => {
clearInterval(interval);
};
}, []);
return (
Current time:
);
}
`
$3
If you want to use default eval-react-clock styling to build upon it, you can import eval-react-clock's styles by using:
`ts
import 'eval-react-clock/dist/Clock.css';
`
User guide
$3
Displays a complete clock.
#### Props
| Prop name | Description | Default value | Example values |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------- |
| className | Class name(s) that will be added along with "eval-react-clock" to the main eval-react-clock