Skip to content

Instantly share code, notes, and snippets.

View criszelaya24's full-sized avatar
💭
Always Learning!

Cristopher Palacios criszelaya24

💭
Always Learning!
View GitHub Profile
@criszelaya24
criszelaya24 / updateTimeBy.js
Last active August 31, 2020 23:55
componente temporizador por tiempo
import React, { useState } from 'react';
const UpdateTimeBy = (props) => {
const today = new Date();
const updateTime = () => {
return `${today.getHours()} : ${today.getMinutes()} : ${today.getSeconds()}`;
}
const [time, setTime] = useState(updateTime())
setTimeout(() => {