Giter VIP home page Giter VIP logo

Comments (20)

tzellman avatar tzellman commented on May 6, 2024 2

Cool! I am by no means a JSX expert, I just tried the changes in your pen and it worked. TIL for me as well. :-)

from hyperapp.

rbiggs avatar rbiggs commented on May 6, 2024 1

I noticed. By the way, when do you sleep?

from hyperapp.

rbiggs avatar rbiggs commented on May 6, 2024 1

Now I did the todos example: http://codepen.io/rbiggs/pen/BpOoNz
Making this link back to here.

from hyperapp.

rbiggs avatar rbiggs commented on May 6, 2024 1

I'd say it's best to automatically convert case for users to avoid unintended errors. Typing habits can be hard to break.

from hyperapp.

selfup avatar selfup commented on May 6, 2024 1

@jbucaran I just meant False Alarm. I made a typo πŸ˜‚

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@rbiggs Yes, I'm fixing them now. πŸ‘

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

JSX one is working already. http://codepen.io/jbucaran/pen/ggjBPE

from hyperapp.

danigb avatar danigb commented on May 6, 2024

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@rbiggs All examples updated.

For those interested in the new HyperApp + JSX integration, check out this collection of pens.

HyperApp + JSX

from hyperapp.

rbiggs avatar rbiggs commented on May 6, 2024

I forked your Codepen counter example and made it pretty :-P. http://codepen.io/rbiggs/pen/zNJGNz

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@rbiggs Sweet! πŸ‘Œ

from hyperapp.

selfup avatar selfup commented on May 6, 2024

@jbucaran @rbiggs I am running into some weird issue with JSX.

The initial component renders fine, but no events fire any updates πŸ€”

http://codepen.io/selfup/pen/WRgOrR?editors=0110

from hyperapp.

tzellman avatar tzellman commented on May 6, 2024

I believe your events should be onclick instead of onClick, and likewise for onkeyup and onkeydown.

from hyperapp.

selfup avatar selfup commented on May 6, 2024

I tried that, but I can try again. I was under the impression that JSX preffered onClick? TIL πŸ‘

from hyperapp.

selfup avatar selfup commented on May 6, 2024

@tzellman omg that totally worked (for the most part, still having event issues haha)! I guess React prefers onClick vs. onclick so that is what i was used to πŸ˜‚

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@selfup JSX is transformed to createElement, which is the agent parsing the string "onClick".

Similarly, with HyperApp, when using the pragma comment directive /** jsx h */, the one parsing the event name is the function h which returns a virtual node. The function that processes that virtual node and actually creates a DOM element may be our own createElement or updateElement.

We could simply introduce a prop.toLowerCase()... πŸ€”

from hyperapp.

selfup avatar selfup commented on May 6, 2024

@jbucaran that could be very nice! Nice thought

from hyperapp.

selfup avatar selfup commented on May 6, 2024

Ok whew I just made a mistake editing when using cmd + d I had:

const direction = e.target.classNameName;

instead of className 🀣

Now all the colors change as they should!

False ⏰

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@selfup False ⏰

You mean something's broken? πŸ€”

from hyperapp.

jorgebucaran avatar jorgebucaran commented on May 6, 2024

@rbiggs Okay.

The relevant code is probably this.

Can you make a PR w/ that? I'll merge-ge-ge it.

from hyperapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.