[react] 생명주기
react의 생명주기란 component의 생성, 변경, 소멸 과정을 뜻한다. 생성 render(), constructor(), getDerivedStateFormProps(), componentDidMount() 변경 shouldComponentUpdate() import React,{Component} from "react"; class ComponentTest extends Component{ /* 1. 첫번째로 실행됨. 최초 1회. */ constructor(props){ super(props); this.state={}; console.log("1. constructor log"); } /* 2. 두번째로 실행 됨. */ static getDerivedStateFromProps(props,sta..
🐕🦵개발/⬅️frontend
2022. 5. 5. 23:52
최근에 올라온 글