DEV Community

Discussion on: Why should I care about React?

Collapse
bseddon profile image
bseddon

React is something I have looked at but have chosen not to pursue. React has many fine attributes especially that it offers a way to encapsulate functionality as components as you describe. However, it also comes with an unwelcome feature you mention only by allusion: the build step.

In the past I have used the Sencha framework (when it was free and called ExtJS and before it became hideously expensive) and React has many similarities. Unfortunately, one of the similarities is the need to execute a build process to transform the React source into a package of actual JavaScript.

To me, an attraction of using a scripting language is that it is possible to change code and run it. More importantly, the code seen in the development tools windows of the browser is the code that's been written. This is not the case with React. Instead, its necessary to install the React developer tools to help the developer relate the code executing in the browser to the React source.

The encapsulation offered by React is welcome but for me it does not justify the cost of retooling the development process to change the way writing code, testing, user validation and documentation is accomplished.

If we are going to retool the whole cycle and accept the need for a build process I want there to be bigger gains so I will be waiting until one or more of the existing strongly typed languages such as C++, Java or C# are able to emit reliable web assembly packages. Using a tool like Razor (based on C#) offers the prospect of being able to run code closer to the machine and so gain performance benefits while also getting access to the existing strong typing, build optimisation, profiling tools and OOP capabilities of a mature development environment.

This is not an option for a group that needs to move today or needs to be able to support IE 9 today but it may be a more cost effective option for some groups that can take a slightly longer view.

Collapse
raddevon profile image
Devon Campbell Author • Edited on

Create React App addresses some of the problems you've mentioned here. It allows me to write code, save it, and see the results almost immediately in the browser.

Source maps address being able to debug with the code I wrote rather than the built code. These come for free with an app generated with Create React App.

The build process is still there, but it has little impact on your development workflow.