I want to put put 2 function then I click on updateButton first a function the second one a callback.
I want one of them in this structure onClick={} and the second one in this structure onClick={() => }
How should I do it ?
const handleModification = (e) => {
e.preventDefault();
setToogleUpdatePost((toogleUpdatePost) => !toogleUpdatePost);
};
const data = "child to parent from update to parent";
return(
{authCtx.userId === props.item.item.userId ? (
// <Button className="updateButton" onClickProps={handleModification}>
<Button
className="updateButton"
onClickProps={() => props.childToParent(data)}
>
)
Of course this code above there is an error I provide more information so that you can better understand what I am trying to accomplish