Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# study-frontend
프론트엔드 스터디를 위한 레포지토리입니다.
# Context 실습

## 실행 방법

```
git clone https://github.com/ApptiveDev/study-frontend.git
git checkout feat/theme
npm i
```

## 실습 내용

1. pages/Home.jsx에는 Heading, Clock, Button 3개의 컴포넌트가 있습니다.
2. ThemeContext를 생성해 다크모드와 라이트모드의 상태를 저장하고 변경할 수 있게 만들어주세요.


<img width="1422" height="670" alt="스크린샷 2025-05-30 오후 2 33 48" src="https://github.com/user-attachments/assets/09fa1d88-f6ee-4c28-bc6a-916bb2ff41b3" />
<img width="1426" height="664" alt="스크린샷 2025-05-30 오후 2 34 01" src="https://github.com/user-attachments/assets/ee6c8db6-905f-47e7-804c-c37740aa62dd" />



- 색상과 디자인은 자유롭게 변경해도 좋습니다.


## 변경 해야 할 파일
1. src/contexts/ThemeContext.jsx
2. src/App.jsx
3. src/components 내 모든 파일
4. src/pages/Home.jsx
33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading