Skip to content

Conversation

@Doozuu
Copy link
Contributor

@Doozuu Doozuu commented Mar 25, 2023

🔗 구현 기능

  • props 받아오기
  • 생명주기함수 5가지 이용하기
  1. render
  2. constructor
  3. getDerivedFromProps
  4. componentDidMount
  5. shouldComponentUpdate

@Doozuu Doozuu added the documentation Improvements or additions to documentation label Mar 25, 2023
@Doozuu Doozuu self-assigned this Mar 25, 2023
@Solarthenomad Solarthenomad self-requested a review March 25, 2023 14:46
Copy link
Member

@Solarthenomad Solarthenomad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨어요😃

}
componentDidMount() {
console.log("componentDidMount 함수입니다.");
this.setState({ tmp_state2: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.setState({tmp_state2 : true })는 componentDidMount에서 선언해줌과 동시에 초기화해주는 함수인 것이고(현재 상태를 true로 바꿔주는), shouldComponentUpdate에서 다시 불러오는 것인가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네! shouldComponentUpdate를 실행하기 위해 tmp_state2를 true로 초기화했습니다.

@Doozuu Doozuu removed the documentation Improvements or additions to documentation label Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants