기본형 함수가 있다.
이 square 함수를 map 안에 익명함수로 바로 넣어 버릴 수 있다.
에로우 함수 사용
인풋이 하나면서 statement가 한 줄 일 때는 { }와 return도 삭제 가능
Arrow 함수에 대해 더 자세히 알기
https://hacks.mozilla.org/2015/06/es6-in-depth-arrow-functions/
'React > React Basic' 카테고리의 다른 글
[React] State | Declarative vs Imperative Programming (0) | 2022.03.19 |
---|---|
[React] Ternary Operator | && | Single responsibility | 로그인, 사인업 플로우| Expression vs Statement | Conditional Rendering | (0) | 2022.03.17 |
[React] 이모티콘 자료에서 뜻만 빼서 100자 까지만 보이기 (0) | 2022.03.15 |
[React] forEach(), map(), filter(), reduce(),find(),include() (0) | 2022.03.14 |
[React] Mapping Data | 이모티콘 사전 | dl dt dd (0) | 2022.03.14 |
댓글