Skip to content

Conversation

@jeongminnnnni
Copy link
Collaborator

2주차 과제 제출합니다

Copy link

@jeonbinggu jeonbinggu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2주차 너무 고생 많으셨고 코드도 잘 짜주셨습니다! 3주차도 화이팅!


import { createContext, useState, useEffect } from 'react';

export const ThemeContext = createContext();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theme에 대한 타입과 함수들을 묶어둔 interface를 정의해 보시는 것을 추천드립니다!
ex)
interface ThemeContextType {
theme: "light" | "dark";
toggleTheme: () => void;
}

text: string;
};

type TodoContextType = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface와 type의 차이에 대해 조사해보고 워크북에 정리해 보시면 좋겠습니다!

{children}
</ThemeContext.Provider>
);
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

근데 번외로 왜 .jsx로 진행을 하셨을까요..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants