My React Journey One Year On

My React Journey One Year On

I started my frontend journey with Angular 1.x, I briefly worked with jQuery but really I started With Angular and it was such a step up from Vanilla JS and provided some awesome reactive functions! I loved Angular I had got use to the syntax and was creating some pretty good reactive frontends and then... Google Killed Angular 1.x

I think I am in the stark majority of people who picked up Angular 1 as it promised a whole new take on reactive frontend development, the two-way data binding was the big selling point and it was great! Sure it didn't scale great and performance leaved a lot to be desired but finally we could create some really awesome frontends without a lot of overhead or monitoring numerous variables, Angular 1.x did pave the way for what we have now, it is just sad that Google had to drop it so hard and in came Angular 2.

Angular 2 promised to be an enterprise grade solution to the frontend, everything was in shiny TypeScript and Microsoft worked closely with Google to bring Angular 2 into Visual Studio along the same time as .Net Core 1 came about modernising the Microsoft stack greatly and proving to be a solid reason to adopt Angular 2 if you are looking for a solution like this. The issue was Angular 2 didn't really have anything to do with Angular 1.x and the jump was huge.

As a result it did splinter the community greatly a lot of people, myself included felt betrayed by Google and I was concerned if Angular 2 would even stick around considering how the first one was just dropped at the height of its use. I am sure this sharp pivot from Google also helped competitors React and Vue grab a foothold in the market and all of a sudden frontend development became a three horse race and to be fair it still pretty much is.

I did move to Angular 2 and after the initial relearning of... well... everything, I did start to like it a lot. Angular 2 is much better designed for scale and speed, it is built with a highly opinionated way which for JavaScript is often important and it is built to scale to huge apps. This however means you are probably not going to spin up an Angular 2 app to create a small widget or simple SPA due to the amount of boilerplate and setup it takes, yet the Angular CLI is awesome and I really love how it is modularised, contains RXJS and creates solid extendable apps and proves great for those enterprise level apps, however this has somewhat worked against it for a lot of the startup community largely swinging to React and then China adopting Vue in a huge way.

I started work at Hooq with no prior knowledge of React, I had worked with Angular 1 and 2 - 6 before but React was a different beast. I remember my first impression of it being messy, it still kinda is, and I disliked how JSX mixed HTML into Javascript. I guess with React being so unopinionated it allowed for apps to be built rapidly, however unless everyone followed a strict format the code could easily become unreadable.

React does a lot different to Angular it uses, at least in our case. Redux to store and enforce state across the app; It mixes HTML, CSS and JavaScript together in the same place; It uses Props to send data into components and read the data; It has different specific lifecycle hooks which have now become simplified; and to be fair it does the job rather well.

Now generally React is considered more of a library for making frontend reactive apps, it relies heavily on third party packages to fill in the holes which allows people to tailor React to their specific needs. This has become ever more common with the more streamlined frameworks that encourage more modularisation, NodeJS did this in a big way and somewhat built the npm ecosystem for JavaScript which has only grown and become a phenomenal repository.

Coming from a highly structured frontend like Angular 2 React can be a tough sell, however it is no secret that React is the dominate frontend library/ framework these days and with Facebook actively driving it I honestly can't see it going anywhere anytime soon. What is nice about React is once you get the basics down it is actually really easy to work with and very fast in getting the desired results making it a create frontend library to work with for a whole range of situations.

When I first started React I was dubious I would like it, after a few months I got use to it and now after just over a year working with it I would say I am very happy to continue working with React, especially when TypeScript is used, and can see many of my future projects using React.