세상 모든 질문에 A/B로 답하다.
- Which browsers need to be supported? 🌐
- Chrome 57^
- Safari 10.1^
- Chrome for Android 116^
- Safari on iOS 10.3^
- Which devices need to be supported? 📱💻
- mobile, tablets, desktop
- Language support? 🌎
- ko-KR only
- Dark theme? 🌙
- No
- Server-side rendering? 🚀
- CSR only
- Tests? 🧪
- No Testing
- Accessibility? ♿
- Partial support
📌 **Vite + React.js**
Esbuild를 기반으로 만들어진 프론트엔드 빌드툴
- 번들링을 생략하여 개발 서버를 빠르게 구동시킨다
- 리로딩과 캐싱이 빠르다
- native ESM을 사용하여 앱에 대한 변경사항이 빠르게 반영된다
- /src
- /components
- /RoundButton
RoundButton.tsx
RoundButton.styles.tsx
RoundButton.stories.ts
- /BottomSheet
- /RoundButton
- /hooks
useModal.ts
useIntersectionObserver.ts
- /pages
home.tsx
login.tsx
- /apis
useUser.ts
- /store
- /utils
- /types
user.ts
- /components
React-Query
zustand(currently not using)
styled-components
- pros
- good for component based project
- maintenance
- code consistency
- cons
- bundle size
- increase of unnecessary codes
storybook
react-router
react-hookz
@toss/slash
S3 + CloundFront
github actions
📌 Simplified Github Flow
- main → prod branch
- dev → prod ready branch
- feat/* → for feature develop branch
- create issue (fix, feature, build whatever)
- create feature branch from develop branch (ex. feat/#31, fix/#26)
- do some magic
- open pull request of your branch
- ready for code review
- ta-da
@Jeon Jinho
- documenting
- CI/CD
@송채영
- component
- use lower case for folders
- ex) /components
- use pascal case for tsx files
- ex) Button.tsx
- use camel case for util files
- ex) formatDate.ts
- use upper case and underscore for constants
- ex) USER_KEY = “”
- use
is
,has
orshould
prefix for boolean state- ex) ❌
const [active, setActive] = useState(false)
- ex) ✅
const [isActive, setIsActive] = useState(false)
- ex) ❌
- use pascal case for types/interface
- ex)
interface ButtonProps { … }
- ex)
- use
handle*
prefix- ex) handleButtonClick
- use
on*
prefix- ex)
<Button onClick={handleButtonClick} />
- ex)