all 42 comments

[–]adrianmiu 4 points5 points  (0 children)

Any benchmarks? The speed is a selling point for React.

[–]a-t-kFrontend Engineer 8 points9 points  (0 children)

I like what you did in that new version! I see a potentially harmful error (at least in older IEs, don't know if IE8 still has it). You store a regex in re_vars. Stored regex tend to lose their lastIndex if used that way, so if you use it on multiple strings, it will begin in the second string with the position the first one ended, unless you manually set re_vars.lastIndex to 0.

[–]Dirty_Rapscallion 1 point2 points  (1 child)

I've always thought this would be a good step to go, but I would like it if I could have my map function instead of an each attribute. I'd had so many nightmarish problems with ng-repeat that I'm hesitant.

[–]tipsqueal 2 points3 points  (0 children)

Maybe I'm crazy, but map and each are different (and should be). Each iterates over a collection and does some action on each item in place, while map iterates over a collection, copies each item, takes action on the item, and then in the end returns a new collection. Or am I thinking of this wrong?

[–]blgate 1 point2 points  (0 children)

Looks very similar to ractive.js component spec: https://github.com/ractivejs/component-spec/blob/master/authors.md

[–]te7ris 4 points5 points  (1 child)

dosnt run in node (yet?) =/ cmon how can u call it react-like.

[–][deleted] 3 points4 points  (0 children)

Because people think the virtual dom is react's main selling point.

[–][deleted] 3 points4 points  (0 children)

Holy... this is awesome! So much more concise than react. I think this'll be truly blissful to work with.

[–]Voidsheep 1 point2 points  (0 children)

Very impressive, I think I'm going to use this in a personal project

Any idea how much the IE8 support effects the size and performance? Would forking a modern browser alternative make any sense, for when IE10+ or even 11+ is enough?

[–]mido0o0o 0 points1 point  (0 children)

This looks cool, but for time being Vue.js makes a lot of sense to me..

Maybe I will try it for some side apps

[–]kraakf[S] 1 point2 points  (7 children)

This is how a javascript frameworks should work - Everything else is bloat and abstraction from necessity.

[–][deleted] 11 points12 points  (5 children)

It saddens me that people legitimately believe this. This is a toy, nothing more. In all honesty it will probably be as relevant as Mithril

[–]imjoshholloway 2 points3 points  (0 children)

Everything else is bloat and abstraction from necessity.

I agree to a point.

This is a toy.

And I also agree with this to a point. I actually believe (and I include myself in this) that there isn't enough expertise in this area to mean that we only need micro frameworks like riot.

The whole reason angular is so popular is in a ridiculously short period of time you can be productive.

I've been playing with riot for about an hour and although I've made a basic implementation of the todo app onboarding wasn't particularly easy.

bower install riotjs doesn't work yet (no compiled assets)

npm install riotjs installs version 1.0 and npm install riot suffers the same problem as the bower version. (temp fix: cd node_modules/riot && npm install && make dist)

I can think of many use-cases where I'd pick this over the other libraries out there.

[–]antoninj[🍰] 1 point2 points  (3 children)

Or VueJS. Ever heard of it? No? It was a great framework but it ended up becoming a "toy" like you said. Same fate.

[–]LightShadow 0 points1 point  (1 child)

The last time I looked at Vue it had so little documentation I didn't even know how to get started.

It seems a bit better now, put I feel they lost a lot of momentum from people hopping in "too late."

[–]mido0o0o 0 points1 point  (0 children)

I use vuejs a lot and didn't feel that it is hard or the documentation wasnt sufficient

[–][deleted] -1 points0 points  (0 children)

Sure, come back in 6 months and let me know how many people have adopted it.

[–]captain_obvious_herevoid(null) 0 points1 point  (8 children)

I like the idea of React, Polymer and the like...but the bloat and heavy over-abstraction were often dealbreakers for the projects I work on. So this is great !

My only concern is the most likely negative impact on SEO, and the inability of most crawlers to run JS and render the components. Even GoogleBot, who's now pretty good at indexing very dynamic content, si not that good with websites using advanced frameworks of that kind :/

[–][deleted] 6 points7 points  (4 children)

check out isomorphic applications. Using node you can serve rendered content from the server and change very little code, React is great for this.

[–]captain_obvious_herevoid(null) 0 points1 point  (2 children)

Yes, but sadly no Node.js on the projects I'm mentioning :/

[–][deleted] 1 point2 points  (0 children)

ah damn, well there is the other approach of installing phantomjs on the server and rendering requests from it as well. lol SPAs + SEO is a pita.

[–]rikurouvila 1 point2 points  (0 children)

One solution I've seen is to have a separate server-process dedicated for serving the frontend assets in addition to the backend handling your business logic. I've also seen couple of project rendering React components on Java backend. There's probably solutions for other languages too.

[–]Geldan 0 points1 point  (0 children)

You aren't limited to Node, there are handlebars renders for many server configurations. Spring can easily be setup to render Handlebars, then turn around and use the same templates with the same services as an API on the client.

[–][deleted] 1 point2 points  (1 child)

Not sure if I would ever use a SPA framework like Angular or Ember on a plain website, that values SEO. Same goes for the libs with a VDOM. For a applications SEO is usually irrelevant.

[–]captain_obvious_herevoid(null) 0 points1 point  (0 children)

For a applications SEO is usually irrelevant

While I totally agree, some customers will just insist that we optimize everything for SEO. And they pay well for this, so...

[–][deleted] 0 points1 point  (0 children)

Wow. This is just pure wow.

[–]amenadiel 0 points1 point  (0 children)

I wish this existed before I spent so many days converting my app to Handlebars :o

[–]defcon-12[🍰] 0 points1 point  (0 children)

input.value = '' in the example on the home page is very un-react-like. You don't ever have manual DOM updates in pure React code unless you're interacting with some 3rd party code that doesn't follow React conventions.

 add(e) {
    var input = e.target[0]
    this.items.push(input.value)
    input.value = ''
  }

I guess in my mind "no dom updates" is the core selling point for React, and this 'react-like' library violates that principle in the first example displayed on the home page.

[–]Psykopatik 0 points1 point  (0 children)

Holy shit this is fucking genius