Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- openapi3
- Spring REST Docs
- Filter
- Spring Batch
- Reduxpender
- SpringBoot
- MFA
- vuejs
- cloud native
- Spring Security
- cheerio
- AuthenticatoinProvide
- stopPropogation
- gradle
- MSA
- T-OTP
- SWAGGER
- Crawling
- tasklet
- SpringRESTDocs
- JavaScript
- Pender
- REACT
- 리액트
- UsernamePasswordAuthenticationFilter
- vue
- OpenStack
- preventdefault
- Flyway
- axios
Archives
- Today
- Total
Miracle Morning, LHWN
4. 화살표 함수에서 라이프 사이클을 사용할 필요가 없는 이유 본문
# 화살표 함수 (Arrow Function) 형식에서 라이프 사이클 함수 (Life Cycle) 을 사용할 필요가 없는 이유
> 함수가 () => {} 작업을 수행할 때 마다 새로운 함수 객체를 만들어내는데,
이런식으로 작동하면 동일한 요소의 여러 복사본을 렌더링할 때 브라우저가 동일한 기능을 재사용하는 것을 방지하여
JavaScript 엔진에 의한 최적화를 더 어렵게 만든다.
이로 인해 성능(Performance) 문제가 발생하게 되어, React 의 Life Cycle 메서드에는 화살표 함수를 사용하지 않는 것이 좋다.
'IT 기술 > [React] Project' 카테고리의 다른 글
6. redux-pender (0) | 2021.06.01 |
---|---|
5. e.preventDefault() 와 e.stopPropagation() 의 차이 정리 (0) | 2021.06.01 |
3. 프록시(Proxy) 설정으로 CORS 이슈 해결 (0) | 2021.06.01 |
[오류] /bin/sh: react-scripts: command not found (0) | 2021.06.01 |
2_0. 조회(GET), 삭제(DELETE), 수정(PUT, PATCH) (0) | 2021.06.01 |
Comments