Is React.js tougher and confusing than Ember or Angular?

When I was starting with JavaScript UI frameworks, I already had knowledge of HTML, css, jQuery and a bit of JavaScript. And I didn’t find it much difficult to learn and start coding in Ember.js, my first JavaScript UI framework to work with. Eventually I started working on other projects with Angular etc and didn’t find them harder either and my life was going smoothly.

Why I was feeling React is crazy

After working with Ember, Angular, I thought it’s time to invest time to another great framework (yeah, I used to think it’s also a framework) React.js and started accordingly. But while working I found it so different and may be a little crazy. Below are the probable reasons why my mind was reacting like that at that point of time.

Inversion of control

While working in other frameworks like Ember Angular, my mind probably started searching for a framework in react, which it was not. (You can check my framework vs library article if you are not sure about the differences.) I was missing predefined practices and a place where things can be done in one way only. But react was full of diversity. You need to build a project from the scratch and you will probably use react just for rendering. You have your own rights to choose a routing library, model handlers whether to go with flux way or mvc or use a redux kind of thing. If you are not an opinionated person and there is a wide range of options in-front of you; you will become confused about the best selections until and unless you go through all of them; which is a huge time investment.

More JavaScript, less HTML

Being a JavaScript developer, I was happy that React is more JavaScriptish than HTMListic. But when I actually went to code a project I started disliking this. Probably I was familiar and comfortable using proper templating; where the template part is completely separated and handled with its own handlers. But in react we do things in JavaScript. Even the html. It gave me a feeling of using .innerHTML, which none of us prefer using frequently in application development.

Webpack

I found majority of the tutorials out there in the internet talks about using webpack for scaffolding your first react application. But I think it confuses people. People should first know basic react. Without webpack or ever without flux redux. Knowing react just as a rendering library is more important than how to scaffold a project.

Data flow in a single direction

Ember, Angular uses two way data binding, while react make the data flow in a single direction only. So trying to learn react after those two frameworks gave me a feeling that I need to handle data change manually. Today the scenario is a little different; Angular 2 is following similar approach and in Ember also people are following this approach rather than using direct two way data binding.

I love JavaScript

I am a JavaScript developer trying to develop something using a JavaScript framework; so why on earth should I use .jsx instead of .js? First of all it given me a non native feeling and the HTMListic syntaxes also drove me crazy. The same reason why I’m not liking Angular 2 much these days.

But I still love React

Yeah, I’m not a hater. I’m developing the front-end of my product Programming City using react. I never say a certain thing is good or bad; cause it’s always the situation who plays the key role to make the decision. Well, below are the points I would like to mention in favor of React.js.

  • The difficulties I mentioned in just a state of mind. They couldn’t last long.
  • Webpack is really helpful and you will fall in love with it once you read about it properly.
  • HTML in JavaScript… well I don’t mind this now a days.
  • If someone is more into frameworks then libraries; there are starter kits available for them to code in react easily.
  • React is fast. Really fast initial rendering.
  • React provides you a very few apis. Everything else is native JavaScript which make the learning curve really small.
About This Author

Hello! I am Paul Shan, a JavaScript Expert, Full Stack and DevOps Engineer cum Consultant based out of Bengaluru, India.