Skip to content

Conversation

@psong0808
Copy link

render함수 실행 시 count를 인자로 넘겨줌으로써 let을 제거할 수 있다.

<h1>과제 1</h1>
<p>
{[1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => (
<button type="button" onClick={() => handleClick()}>{i}</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

          <button type="button" onClick={handleClick>{i}</button>

핸들러 함수 참조만 전달해도 좋겠네요 ㅎㅎ

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.

2 participants