Skip to content
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

[React] setState #5

Closed
igy95 opened this issue Mar 17, 2021 · 1 comment
Closed

[React] setState #5

igy95 opened this issue Mar 17, 2021 · 1 comment
Assignees
Labels
React 리액트

Comments

@igy95
Copy link
Collaborator

igy95 commented Mar 17, 2021

왜 state를 직접 변경하지 않고 setState를 이용하나요? (단답형)

@igy95 igy95 added the React 리액트 label Mar 17, 2021
@hochan222 hochan222 added this to 신규 이슈 in 전체 현황 via automation Mar 18, 2021
@hochan222 hochan222 moved this from 신규 이슈 to React in 전체 현황 Mar 18, 2021
@cos18
Copy link
Contributor

cos18 commented Mar 22, 2021

박성우: 리엑트의 랜더링 과정에 의해 필요하기 때문.

이호찬: this.state는 컴포넌트를 다시 랜더링하지 않기 때문.

박소현: state가 immutable하기 떄문에 덮어씌우기로 변경해야되기 때문에. 리엑트 로직을 설명할때, state에 그냥 새로운 객체 넣으면 immutable유지되는데 굳이 setstate 사용해야하는지? 질문을 받아서... -> Reconciliation...!! 관련 이슈

임광열: "상태 불변성 유지"가 중요. observer pattern ~= react

@cos18 cos18 closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React 리액트
Projects
Development

No branches or pull requests

2 participants