Rezact / Rezact

A JavaScript Framework/Library (call it what you want) that blends the best of svelte, solid, react, and many others.

Home Page:https://rezact.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG dot notation inside onClick handler treated as signal

zachlankton opened this issue · comments

the following code:

<tr onClick={(ev) => {
  chkbox.checked = !chkbox.checked
}}>

is being transpiled into this:

<tr onClick={(ev) => {
  chkbox.checked.set(!chkbox.checked)
}}>

Expected:
No transpilation should be happening on this as there are not any $ prefixed signals

Work Around:

Moving the onClick handler out of the JSX seems to fix this problem for now:

const chkBoxClick = (ev) => chkbox.checked = !chkbox.checked

<tr onClick={chkBoxClick}></tr>