A brief review of the React.js framework, for those wondering whether to use it or not

What exactly does React do?

To put it simply, you can think of React’s functionality a bit like an extension of echoing things in PHP: rather than echoing unwieldy strings of HTML from your PHP backend, you can use React to neatly define HTML components into classes and subclasses, render them with JavaScript functions and make for a much tidier UI building experience.

An example from the React tutorial, of how rendering something in React looks.
From React’s “getting started” section.

Why is React mainly suited to heavy-duty projects?

There are two primary reasons.

  • Babel installed
  • NPX configured to watch your React source code directories, so it can preprocess/compile all React-including files into valid JavaScript


From what I’ve seen, React is a very good choice to consider if you intend on making a very complex UI that requires a lot of classes and subclasses; echoing content in PHP can get difficult to maintain given it’s all in strings, and being able to subclass a component in the manner React does is very handy.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store