Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 느낀 점
- Nicolas
- react-hook
- Clone
- vanilla js
- Firebase
- coding
- react-native
- TiMER
- 계획
- 코코아톡
- github
- 클론코딩
- 프로젝트
- Hook
- 자바스크립트
- Nomad
- Netflix
- expo
- 마무리
- Vanilla
- CSS
- 바닐라 자바스크립트
- scflix
- 오류
- react
- javascript
- Project
- Nomad coder
- HTML
Archives
- Today
- Total
목록Error: Too many re-renders. React limits the number of renders to prevent an infinite loop. (1)
꾸매코딩
[React] new Date(), state를 활용한 동적인 현재시간 나타내기
오류 import React, { useState } from 'react' export default function App() { const [timer, setTimer] = useState('0'); const currentTimer = () => { const date = new Date(); const hours = String(date.getHours()).padStart(2, "0"); const minutes = String(date.getMinutes()).padStart(2, "0"); const seconds = String(date.getSeconds()).padStart(2, "0"); return (`${hours}:${minutes}:${seconds}`) } const cu..
Project/Timer Project
2021. 7. 6. 17:50