mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
Update Time.jsx (#255)
This commit is contained in:
@@ -8,9 +8,7 @@ export default function Time() {
|
||||
setTime(new Date().toLocaleTimeString());
|
||||
}, 1000);
|
||||
|
||||
return () => {
|
||||
clearInterval(timer);
|
||||
};
|
||||
return () => clearInterval(timer);
|
||||
}, []);
|
||||
|
||||
return <p>Current time: {time}</p>;
|
||||
|
||||
Reference in New Issue
Block a user