Skip to content

Commit a490005

Browse files
behnammodiljharb
authored andcommitted
[react] event handlers should not return values
1 parent bb011c2 commit a490005

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ We don’t recommend using indexes for keys if the order of items may change.
540540
{props.items.map((item, index) => (
541541
<Item
542542
key={item.key}
543-
onClick={(event) => doSomethingWith(event, item.name, index)}
543+
onClick={(event) => { doSomethingWith(event, item.name, index); }}
544544
/>
545545
))}
546546
</ul>

0 commit comments

Comments
 (0)