skip to Main Content

Javascript – Why is Next.js throwing Event handlers cannot be passed to Client Component props even though component has "use client" on top?

My bundler creates a simple React component as follows "use client"; "use strict";var a=Object.create;var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;var m=(t,o)=>{for(var n in o)r(t,n,{get:o[n],enumerable:!0})},c=(t,o,n,u)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of i(o))!s.call(t,e)&&e!==n&&r(t,e,{get:()=>o[e],enumerable:!(u=b(o,e))||u.enumerable});return t};var B=(t,o,n)=>(n=t!=null?a(l(t)):{},c(o||!t||!t.__esModule?r(n,"default",{value:t,enumerable:!0}):n,t)),f=t=>c(r({},"__esModule",{value:!0}),t);var x={};m(x,{Button:()=>k});module.exports=f(x);var p=B(require("react")),k=()=>p.createElement("button",{onClick:()=>alert("boop")},"Boop");0&&(module.exports={Button}); //# sourceMappingURL=Button.js.map Although it has "use client" on top,…

VIEW QUESTION

Reactjs – Cant send backgroundImage in props

I have a problem to pass the backgroundImage this is my code: Home.js import React from 'react'; import './Home.css'; import AlarmCardInvertida from '../components/AlarmCardInvertida'; function Home() { const alarmCardInvertidaData = [ { background: '../../images/banners/casa01.jpg', }, ]; return ( <> <h2 className='alarm-cards-title'>Funcionalidades…

VIEW QUESTION
Back To Top
Search