197
rated 0 times
[
200]
[
3]
/ answers: 1 / hits: 10106
/ 2 Years ago, thu, november 17, 2022, 12:00:00
Error: Event handlers cannot be passed to Client Component props.
^^^^^^^^^^
If you need interactivity, consider converting part of this to a Client Component.
const reqHelp = () => {
Swal.fire({
title: '1',
text: '1',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes',
cancelButtonText: 'No',
})
}
return(
<div className="buttons">
<button onClick={reqHelp} className="stopwatchButton">Request Help</button>
</div>
);
Search NextJS 13 Official Document and about Server/Client Render
More From » reactjs