See the third paragraph of this answer:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| React why onClick property function triggers without click) | 3 | 61783 | January 18, 2021 | |
| What is the difference between both button click in the given React Component? | 5 | 638 | February 2, 2021 | |
|
React JS what is the proper way to bind a property to a function onClick?
|
12 | 3083 | January 16, 2021 | |
| Functions as props | 3 | 826 | May 4, 2022 | |
| onClick handler calls | 5 | 2029 | December 14, 2022 |