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

Fri Feb 03 2017

Paul Shan

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.

SHARE THIS ARTICLE

Today everyone knows the importance of a lightning-fast website and how the speed impacts the conversion rate of a business. Today, everyone wants the site to be a PWA so that the mobile users can have an app-like experience with the website because, for the majority of the merchants, the customers come through mobile devices.
Tue Apr 20 2021
Here we are going to see how you can manage backup and restore of Postgres database with docker.
Thu Sep 03 2020
Image sliders or carousels always have increased the UI attraction of websites and they are pretty useful for reflecting the major roles/products too. In case, I am having a website that sells tee-shirts,
Mon Apr 30 2018

About VoidCanvas

This blog was created out of hobby and talks mostly about technology, web development, JavaScript, NodeJS and related topics. Thank you for reading my blog.

Copyright 2022 - www.voidcanvas.com

Popular Articles

Authentication using Google's oAuth api with node.js

Thu Mar 10 2016

OAuth authentications are pretty popular now a days and another thing which is popular is JavaScript. This article shows how to plugin google’s oAuth api for authentication in your own node application.

CSS3 Loader Snippet Collection: (Part 2 - Squares)

Sat Mar 01 2014

This is a continuation of my CSS3 loader snippet collection series. I've provided spinning css3 animation loader in the part 1 of this series and here in part 2, I'm providing various square type loading