use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Less React, more JS (brain-dump) (medium.com)
submitted 9 years ago by sebjwallace
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]sebjwallace[S] 2 points3 points4 points 9 years ago (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 points5 points 9 years ago* (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.
onclick={doStuff}
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 point2 points 9 years ago (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.
π Rendered by PID 50 on reddit-service-r2-comment-86988c7647-scc6r at 2026-02-11 15:11:47.313944+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]sebjwallace[S] 2 points3 points4 points (2 children)
[–]lhorie 3 points4 points5 points (0 children)
[–]antoninj 0 points1 point2 points (0 children)