자바스크립트/React

[React] Warning: Expected `onClick` listener to be a function, instead got a value of `object` type.

KIMJAVAN 2023. 11. 27. 15:07
728x90

Warning: Expected `onClick` listener to be a function, instead got a value of `object` type.

 

onClick = {함수} (X)

onClick = {()=>{함수}} (O)