Does using JSX syntax like onclick={...} require build tools?
Closed this issue · 2 comments
jkleiser commented
My AppRun projects this far have been small toy apps, experiments that can be run in my BBEdit editor without any build tools at all. However, when I tried to do something like this (described in the docs as JSX syntax):
<input type="text" onchange={() => app.run("INP", rowIdx)}>
then the code after the =>
ended up outside the input element, as text.
I also tried this, with no success:
<input type="text" onchange={function() {app.run("INP", rowIdx);}}>
Does this mean that I have to use some build tools including transpiling for that JSX syntax to be accepted?
I looked for examples using onchange=
in the code at https://github.com/yysun/apprun-examples but found none, just a few using onclick=
.
yysun commented
Yes, JSX requires a compiler. You can try the apprun CLI to initialize the development environment.
npm install apprun -g
apprun --init
npm start
jkleiser commented
Thanks.