• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

시계를 잘 만들었는데 바뀌는 부분이 반짝거리지 않아요

24.01.23 11:00 작성 조회수 326

1

시계가 정상적으로 작동하는데 강사님이 말씀해주시는 것 처럼 변경된 사항이 반짝이지 않아요

답변 2

·

답변을 작성해보세요.

1

한영훈님의 프로필

한영훈

질문자

2024.01.24

바꾼대로 했더니 정상적으로 작동됩니다. 빠른 답변 감사합니다

0

안녕하세요, 소플입니다.

혹시 index.js 파일 소스코드를 보여주실 수 있으실까요?

 

감사합니다.

한영훈님의 프로필

한영훈

질문자

2024.01.24

import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

import Library from './chapter_03/Library';
import Clock from './chapter_04/clock';
import CommentList from './chapter_05/Comment-list';
import NotificationList from './chapter_06/NotificationList';
import Accommodate from './chapter_07/Accommodate';
import ConfirmButton from './chapter_08/Click';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <Clock />
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

Clock 컴포넌트는 아마 잘 구현하셨을 것 같은데,

Chapter04의 경우에는 index.js를 아래와 같이 setInterval을 사용하는 형태로 구현하셔야 됩니다.

아래와 같이 수정한 이후에 다시 실행해보시기 바랍니다!

 

image