-
Notifications
You must be signed in to change notification settings - Fork 0
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
ui: Input(textarea) 컴포넌트 및 관련 세부기능 생성 #23
Conversation
작업 끝나면 리뷰어에 추가해주셔~ |
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.
초연!! 수고했다우.
우리가 atom 컴포넌트를 만드는 이유 중의 하나가 재사용 + 미래 구현에만 집중하기 위해서인데
현재 초연이의 textArea
에는 입력받았을 때 그 입력 이벤트를 관리할 수 있는 상태를 얻기 어려운 것 같아!
그래서 textarea에서 관리하는 값을 value
로 넘겨주던가,ref
를 이용하여 textarea의 dom을 조작할 수 있도록 외부에서 props를 받아와야 할 것 같아요!!
main 컴포넌트 개발 시 어떻게 하면 textarea에 입력되는 데이터를 백엔드에게 쉽게 넘겨줄 수 있을까? 고민해서 이 부분만 수정해주면 좋을 것 같아오우~
<StyledTextArea
value={value}
ref={ref} //생략가능 (선택)
onChange = {onChange}
{...props} //이렇게 세팅하면 textarea dom 이 가진 다른 프로퍼티들도 가져올 수 있응
/>
그럼 나중에 초연이가 만든 컴포넌트를 쓸 일이 있을 때 이렇게 써볼 수 있겠지
<TextArea
value={value}
onChange={onChange}
/>
//onChange 함수를 통해서 `value`값 수정하거나, `e.target.value`에 대한 조작 가능
@@ -1,8 +1,8 @@ | |||
import type { Preview } from "@storybook/react"; |
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.
초연이 vscode에서 쓰는 eslint에 설정이 있나??
""
을 ''
로 바꿔주는 것 같네 !
우리 로컬 eslint로만 작동해야 하는데 내가 세팅을 잘못한 거 같구만... 고쳐보겟씁니당
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.13.0", |
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.
헉 이건 왜 버전업이 된걸까요??
움.. 처음에 시작할 때 yarn dev 안되는 오류 났던거 때문에 막 install 해보고 이랬던거 때문인가?.. 정확한 이유는 잘 모르겠다 ㅜ!
No description provided.