Answers for "using props in function component for onclick event"

0

using props in function component for onclick event

const HelloWorld = ({ dispatch }) => {
  const handleClick = useCallback(() => {
    dispatch(something())
  })
  return <button onClick={handleClick} />
}
Posted by: Guest on March-08-2021

Code answers related to "using props in function component for onclick event"

Browse Popular Code Answers by Language