Hacker News new | ask | show | jobs
by nzonbi 3631 days ago
I have used react and angular2. Plus some other frameworks like polymer and vuejs. And have studied a few others. The one that makes me more productive is riotjs. Simple, minimalist design, yet it has the best implementation of components of them all. Components are custom tags written in html, with scoped javascript and css styles, in a single file. This is easier than React because your html is actual html, not trapped inside of render jsx functions. It is easier than angular, because it is simpler, faster to write and read.

It has one way data binding, like React, that is simpler to reason than 2-way in Angular. Riotjs is the framework that I recommend.

2 comments

Angular2 also felt a bit over engineered to me. With text templates and component decorators.

I used React for a year now and would probably consider Preact for new projects. I can use most of the React stuff I already know with a smaller and faster framework.

In angular 2 Components are also custom tags written in html, with scoped javascript and css (you can choose the scoping) in a single file (also optional). So how is it different?
The base structure may be somewhat similar. However Angular 2 makes things more complicated with more stuff: dependency injection, class decorators, services, etc. Riotjs takes a simpler approach, inspired by React, but improved with better design. In Angular 2 inline html templates that are not syntax-highlighted by code editors. Full html templates require spliting the component in separated files.

In Angular 2 there are multiple data bindings syntaxs: There is one way up, one way down, or 2 ways. In Riotjs, there is only one, and you can use it with the Flux architecture or similar for a simpler, easier to reason about, and proven architecture. In my opinion Angular 2 is over enginered, with a lot of stuff that you can easily do without it. See React. And by not having over enginered stuff, you benefit of a simpler architecture that is easier to learn, and simpler to use. I have found that simplicity makes many people more productive. And React and Riotjs both are simpler than angular 2.