-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
App.js의 데이터를 props를 이용해 ExpenseItem 컴포넌트에 전달한다. props를 사용함으로써 컴포넌트의 재사용성을 높일 수 있다.
- Loading branch information
Showing
2 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6587446
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비구조화 할당을 이용한 props 전달받기
😊 비구조화 할당: 객체에서 값을 추출하는 문법
위와 같은 코드도 정상적으로 동작한다.
6587446
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 방식으로 Props 주고 받기 (배열 내 객체 전체를 props로 전달)
App.js
ExpenseItem.js