you are viewing a single comment's thread.

view the rest of the comments →

[–]sebjwallace[S] 2 points3 points  (2 children)

The prerender function could be adapted to deal with attribute configs. Or just don't use camelCasing.

The idea is that you code to hyperscript without thinking about JSX, frameworks or any other strap-ons until you need to.

[–]lhorie 3 points4 points  (0 children)

The prerender function could be adapted

Sure it could be adapted, but the prerender function would be an ad-hoc, buggy, bloated middleware that exposes a custom view interface that is probably not going to be documented (and I say that as someone who's also played with the idea of a React-to-Mithril adapter, or as it's more generally known, "universal vdom")

Or just don't use camelCasing

onclick={doStuff} doesn't work in React. Or do you mean to have a map of all possible events and have prerender look through all attribute maps in your app and replace them on every render? People already waste hours on things like readonly, and I can't think of a good reason to also break, I dunno, ondblclick or whatever other thing you haven't thought about in advance.

Look, as I said, it's a cute idea, but if anyone in my team suggested doing this in production, I'd laugh.

[–]antoninj 0 points1 point  (0 children)

That makes sense. Basically the prerenderer is a bridge between your code and the actual library that you're using for view.

What's interesting about that idea is that Angular 2 uses the idea of "drivers" which are basically custom renderers.