qwik
qwik copied to clipboard
qwik-react: `onClick` bindings are not working
Qwik Version
0.11.0
Operating System (or Browser)
OSX 12.6 / any browser
Node Version (if applicable)
16.13.0
Which component is affected?
Qwik React
Expected Behaviour
onClick bindings are working on react components and the alert is shown
Actual Behaviour
these code does not work on the qwik-react starter app:
/** @jsxImportSource react */
import { qwikify$ } from "@builder.io/qwik-react";
// qwikify$() takes a react component and returns
// a Qwik component that delivers zero JS
export const MUIButton = qwikify$(() => {
console.log("in render");
return (
<>
<button onClick={() => alert("qwiky react")}>Hello from React</button>
</>
);
});
Additional Information
To reproduce:
pnpm create qwik qwik-react-bug
cd qwik-react-bug
pnpm qwik add qwik-react
open integration/index.tsx file and past code from above
pnpm dev
And then open http://localhost:5173/react in your browser.
PNPM version: 7.13.4