-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
강원대 FE_조중현_1주차 과제 #77
Open
faddishcorn
wants to merge
23
commits into
kakao-tech-campus-2nd-step2:faddishcorn
Choose a base branch
from
faddishcorn:faddishcornstep3
base: faddishcorn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5050e5a
chore:이니셜프로젝트세팅with React,Typescript,ESLint,Prettier,Emotion
faddishcorn a1f7b83
chore: clean up
faddishcorn 45dab14
chore: cleanup
faddishcorn 1a91bb2
chore: cleanup
faddishcorn fffdef8
docs: 리드미 업데이트
faddishcorn 76beced
feat: Grid 컴포넌트 구현
faddishcorn 22b09dc
feat: Grid컴포넌트 구현
faddishcorn 3338985
feat: Container컴포넌트 구현
faddishcorn f46cb59
feat: Container스토리 구현
faddishcorn 4e4714d
feat: Image컴포넌트 구현
faddishcorn d4bba70
feat: Image스토리 구현
faddishcorn 96ab3be
feat: GoodsItem 컴포넌트 구현
faddishcorn dbe656d
feat: GoodsItem스토리 구현
faddishcorn 0ec4bbb
feat: Input컴포넌트 구현
faddishcorn cb9d0c3
feat: Input컴포넌트 구현
faddishcorn 47d3933
feat: 버튼 컴포넌트 구현
faddishcorn d1e37db
feat: 버튼 스토리 구현
faddishcorn 04e46e0
build: GoodsItem 컴포넌트 재작성
faddishcorn 674e263
build: GoodsItem스토리 재작성
faddishcorn c1848f9
build: Image스토리 재작성
faddishcorn 3c352b7
build: Image컴포넌트 재작성
faddishcorn e67b651
build: 컨테이너 컴포넌트 재작성
faddishcorn 93df2c6
build: 컨테이너 스토리 재작성
faddishcorn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'airbnb', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['react', '@typescript-eslint', 'prettier'], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'react/jsx-filename-extension': [ | ||
1, | ||
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] }, | ||
], | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }], | ||
'react/react-in-jsx-scope': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'react/require-default-props': 'off', | ||
'no-unused-vars': 'warn', | ||
'import/no-unresolved': 'off', // 임시로 경고 무시 | ||
'import/extensions': 'off', // 임시로 경고 무시 | ||
'react/function-component-definition': [ | ||
2, | ||
{ namedComponents: 'arrow-function' }, | ||
], | ||
'react/jsx-props-no-spreading': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
node_modules/# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# IDE/Editor settings | ||
.vscode/ | ||
.idea/ | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# macOS system files | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
__MACOSX | ||
|
||
# Windows system files | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
$RECYCLE.BIN/ | ||
|
||
# Linux system files | ||
*~ | ||
.nfs* | ||
|
||
# TypeScript build artifacts | ||
*.tsbuildinfo | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Icons and image files | ||
*.png | ||
*.jpg | ||
*.jpeg | ||
*.gif | ||
*.ico | ||
|
||
# Miscellaneous | ||
*.lock | ||
*.log | ||
*.bak | ||
*.tmp | ||
*.cache | ||
*.dist | ||
*.sync | ||
|
||
# Generated files | ||
dist/ | ||
build/ | ||
tmp/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"semi": true, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** @type { import('@storybook/react-webpack5').StorybookConfig } */ | ||
const config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
|
||
addons: [ | ||
'@storybook/preset-create-react-app', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
|
||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
|
||
staticDirs: ['..\\public'], | ||
|
||
docs: {}, | ||
|
||
typescript: { | ||
reactDocgen: 'react-docgen-typescript', | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @type { import('@storybook/react').Preview } */ | ||
const preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
|
||
tags: ['autodocs'], | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"files.eol": "\n", | ||
"prettier.endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# react-gift-react-foundation | ||
FE 카카오 선물하기 1주차 과제: React 기초 | ||
# FE 카카오 선물하기 1주차 과제: React 기초 | ||
|
||
--- | ||
|
||
## 구현 컴포넌트 | ||
|
||
### Button.tsx | ||
|
||
### Input.tsx | ||
|
||
### GoodsItem.tsx | ||
|
||
Default와 Ranking컴포넌트가 구현되어있습니다. | ||
|
||
### Grid.tsx | ||
|
||
### Container.tsx | ||
|
||
### Image.tsx | ||
|
||
코드에 사용자가 number값을 입력하여 storybook에서 선택할 수 있습니다. | ||
|
||
--- | ||
|
||
### 질문 1: webpack은 무엇이고 어떤 역할을 하고 있나요? | ||
|
||
webpack은 모듈 번들러(Module Bundler)로, 여러 개의 파일(HTML, CSS, JavaScript, 이미지 등)을 하나의 번들 파일로 결합하여 웹 애플리케이션의 로딩 속도를 향상시키는 도구입니다. 웹팩은 다양한 플러그인과 로더를 사용하여 여러 가지 기능을 수행할 수 있습니다. | ||
|
||
### 질문 2. 브라우저는 어떻게 JSX 파일을 읽을 수 있나요? | ||
|
||
브라우저는 기본적으로 JSX(JavaScript XML)를 직접 이해하거나 실행할 수 없습니다. JSX는 React에서 사용되는 JavaScript 확장 문법으로, JavaScript 코드 안에 HTML 같은 구조를 작성할 수 있게 합니다. 브라우저에서 JSX 파일을 읽고 실행하기 위해서는 Babel과 같은 트랜스파일러를 사용한 사전 처리가 필요합니다. | ||
|
||
### 질문 3. React에서 상태 변화가 생겼을 때 어떻게 변화를 알아챌 수 있나요? | ||
|
||
userState같은 훅을 사용하여 상태를 정의하고 이것의 상태 업데이트 함수가 호출되면 리액트는 해당 컴포넌트의 상태가 변경되었음을 인식 및 재 렌더링 합니다. 그에 따라 변경된 상태를 사용하여 UI를 업데이트합니다. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 조금 더 근본적으로 리액트가 상태 변화를 감지하는 과정에 대해서 이해하려면 '리액트는 state를 immutable한다.'는 사실을 이해해야 하는데, 여유가 되실 때 이 개념에 대해 학습하시는 것을 추천드립니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
webpack: { | ||
alias: { | ||
'@components': path.resolve(__dirname, 'src/components'), | ||
'@utils': path.resolve(__dirname, 'src/utils'), | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js'; | ||
|
||
export default [ | ||
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, | ||
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } }, | ||
{ languageOptions: { globals: globals.browser } }, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
pluginReactConfig, | ||
]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
왜 임시 룰을 적용하게 되셨나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확장자 명 관련 오류랑 컴파일할 때 eslint가 import 경로관련 에러를 자꾸 출력해서 관련규칙을 이것저것 꺼보느라 남겨두었던 주석을 그대로 남겨둔 것 같습니다😅