woowacourse-teams / 2021-zzimkkong Goto Github PK
View Code? Open in Web Editor NEW✅ 공간을 한 눈에, 예약은 한 번에!
Home Page: https://zzimkkong.com
✅ 공간을 한 눈에, 예약은 한 번에!
Home Page: https://zzimkkong.com
Panel
컴포넌트에서 PanelContext
의 타입이 맞지 않아 정상적인 컴파일이 진행되지 않는 문제가 있습니다.yarn start
로 개발 서버를 실행합니다.Panel
컴포넌트와 관련된 타입 문제로 인해 개발 서버가 열리지 않습니다.import 순서 정렬을 eslint 규칙에 맞게 적용
(유조: 귀찮은 일은 기계에게!)
process.env
사용을 위한 NODE_ENV
를 사용할 수 없는 문제를 해결하기 위해 cross-env
패키지 적용이 필요함.Table
컴포넌트Table
컴포넌트를 구현한다.Panel
컴포넌트Panel
컴포넌트children
: ReactNode
expanded
: boolean
expandable
: boolean
-
, _
, !
, ?
, .
, ,
])class A extends Component {
render() {
const [expanded, setExpanded] = useState(false);
return (
<div></div>
)
}
}
다음과 같이 hook을 클래스 컴포넌트에 작성하는 코드를 작성했습니다.
react-hooks/rules-of-hooks
에 의해 Warning이 발생합니다.
아무런 Warning도 없습니다.
현재 eslint-plugin-prettier
와 eslint-config-prettier
를 설치하지 않은 채로 ESLint 설정을 해서 ESLint가 제대로 동작하지 않습니다.
ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.
theme
의 역할에 맞도록 theme
객체를 재정의한다.현재 theme
객체는 유동적으로 페이지의 색상을 변경할 수 있는 theme
객체의 역할보다는 Color palette의 역할에 가깝습니다.
예를 들어, 현재 텍스트 색상을 지정하는 스타일의 경우 다음과 같이 정의되어 있습니다.
color: ${theme.black[400]};
만약 theme
을 이용하여 페이지를 다크 모드로 변경한다고 했을 때, 텍스트 색상은 밝은 색이 되어야 할 것입니다. 하지만 현재 상태에서는 무조건 검은색의 텍스트 색상만 보여진다는 의미가 됩니다.
따라서, 텍스트나 선과 같이 element의 색상이 theme에 따라서 어색하지 않게 보여줄 수 있도록 theme
을 다시 정의해주어야 합니다.
예를 들어서 텍스트 색상은 다음과 같이 쓸 수 있을 듯합니다.
color: ${theme.color.text[400]};
어느 정도 기능 정의가 끝나면 함께 리팩토링을 진행해봤으면 합니다.
그 동안 theme
과 관련하여 좀 더 공부해보고, 관련 사례도 찾아보겠습니다.
{
"message": "",
"data": ""
}
// 에러
{
"message": ""
}
ReservationList
컴포넌트 구현header
: ReactNode
ReservationListItem
컴포넌트 구현controls
: ReactNode
-
, _
, !
, ?
, .
, ,
])A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.