Sometimes you need a hands-on experience to better understand whether a new Front-End Technology is actually hype or not. With React the latest project I am in seems to be my hands-on experience. Of course this article in case anyone cares to read through it is based solely on my personal opinion, but lets take things from the start.

A new project

I was give the choice to join a new project that would be using all the latest FE tech. React, Web sockets, ES2017, JSS etc. At first it sounded exciting. But after joining the project I more or less noticed a few things.

  1. The project structure has many levels of complexity. Essentially it takes a lot of time to get to understand the various imports, in all cases having that much of a verbosity making it a pain to work with.
  2. Redux state has been broken into many small pieces based on the amounts of routes, subroutes and even components. Trying to follow state in many cases is difficult. Meanwhile child components do not have access to parent component state which is useful for some them.
  3. JSS is being used together with material ui. JUST NO. Why did the person responsible decided to do this. CSS haσ nothing to do with JavaScript. Not to mention that they are changing styles inline messing with the critical rendering path altogether.
  4. Setting up the project and making changes is a pain. The project creator used a web application template that was for experimentation, for a production web application. Who is going to support and extend this project unless it is a senior level developer. Junior level developers have no luck.
  5. The development team I joined is not following ANY git pattern whatsoever for handling JIRA tickets essentially committing+pushing to the same branch. In case you pull from this branch and something is broken it ripples to all the other developers.

Opinionated developer wise thoughts

When someone badmouths React I see a lot of developers defending this library as if they built it. Even Dan Abramov wrote an article that Redux might be unnecessary and it was his “baby”. As developers we should NOT take sides when building ANY web application. Every tool, is it a framework or a library has its uses. Defending a tool with such fervor is something quite odd and I laugh at reddit conversations with people accusing others that they are stupid for not understanding overly verbose code for achieving trivial stuff. In other words IT IS NOT NORMAL.

React is an exceptional library and surely I can attest to that since I have used it as a COMPLIMENTARY tool NOT a full fledged solution. Why is everyone that eager to dispense authoring aka HTML+CSS, for pure JavaScript development. JavaScript is not suitable for all types of projects let alone supporting these.

Why are we so eager to throw away jQuery, Ajax calls and the rest. Am I trying to stick into these “old” FE technologies? NO. But I believe that what should come first is TEAM SATISFACTION and not ONE PERSONS DEVELOPMENT EGO making choices that would affect the entire project scope.

If I was to build the above project I would use React as a library for some parts as Facebook is doing, not build the entire web application with it. I would throw JSS and stick to SASS with a proper folder structure to support code reuse. Rest APIwould be my first choice for calling the back-end using Axios. ES2017 would be OK but with a maximum of 2 levels deep of folder/components complexity. I would stick with plain HTML using a template library or maybe a library which supports templates e.g. angularjs, vuejs(maybe).

I would build a project that would be easy for the JUNIOR developer to work with and feel satisfied that he/she is ACTUALLY contributing.

Finally I would built a project as if I was the junior developer and would like to have an induction as easy as breathing.

Final thoughts

Remember that boarding the hype train is like boarding a train without seeing where it is heading into. It might be a paradise or a wall. Just because some fellow developer in our field wrote an article about React or a library that he/she believes is the future does NOT mean that this SHOULD be the future.

Have he/she tried it on a production project? I am not talking about a small project in the comfort of our home. I am talking about a full fledged project with maybe 20+ developers to say the least with its person handling different parts of the application.

To end this article I am under the assumption that a lot of the various FE are not being used correctly as they should. This means that the main reason that they are actually being used is because a lot of us are afraid to say NO React, VueJS, Polymer etc. are NOT suitable for EVERY project. Meanwhile, we are afraid that by saying this we are going to be shunt upon from other developers, defending these technologies for a reason unknown. The funny thing is that the actual creators are in many cases suggesting that there solution might not the best approach. Therefore I am urging before starting a project to consider the following: team experience, team satisfaction, team support. T3 so to speak :-)