코드 컨벤션
// Good
const name = () => {} // (스니펫 단축키 rafce)
// Bad
function name() {}
on + 동작 + Handler
형태로 생성// Good
const onChangeHandler = () => {};
// Bad
const changeHandler = () => {};
const handleChange = () => {};
// Good
export const name1 = () => {};
export const name2 = () => {};
// Bad
const name1 = () => {};
const name2 = () => {};
export {name1, name2};
// Good
if(true) {
alert("");
return;
}
// Bad
if(true) {
return alert("");
}
const onChangeHandler = (e) => {}
interface Todo {
id: string;
title: string;
content: string;
isDone: boolean;
}
시맨틱 태그(Semantic tag)
(1) <div> 남발하지 말고 <main>, <nav>, <section>, <article>
(2) <article> <<< <section> <<< <main>
깃플로우 전략
[feat/#81] - header 컴포넌트 생성
, [style/#81] - header 컴포넌트 tailwind 적용
close #81
#81