Why We Love the React Framework (Or Why We’re Willing to Forgive Facebook for Taking over the Internet)
Dear fellow development aficionado: Is your body wracked with anxiety over a new web or mobile app that’s got a tight budget, a tight schedule, or both? Does the idea of taking a deep dive into some jQuery spaghetti code make you want to leave it all behind and restart your life in rural Appalachia?
Take a deep breath, put down the industrial-strength muscle relaxer because—and I never thought I’d say this—all of your problems have already been solved by Facebook.
So light some candles and put on the Luther Vandross, because I’m going to introduce you to the new love of your life: the React framework.
What is React?
An Extremely Brief History of the Universe (of Web Apps)
Before we start cataloguing React’s superpowers, let’s take a spin in the dev DeLorean.
Developing web apps, even the small- to medium-sized variety, can be tricky. Previously, we developers relied on server-side rendering to generate our code. Using frameworks like PHP or ASP, we could quickly and easily (well, depending on their requirements) do things like hide or show elements and populate data, but it required everything to be handled by a server in a data center somewhere. Meaning we only really had to worry about state and performance in one place: the server. Nevermind HTML or the client; they’re just getting what we send them. This worked for a long time and still works today in a lot of cases.
This is when React gives a hearty laugh and steps in to save the day.
React to the Rescue
React uses this to address the issue of maintaining the state between your HTML and JS by directly integrating the two. Since React components (the basic building blocks of React) are JS with HTML output, the HTML can react (that’s where the name comes from!) to changes in the JS state automatically. Your functions never have to query the document to see what the state of the HTML is, leading to huge performance boosts. And because React is broken down into components consisting of all the functionality for a piece of UX (HTML, JS and even sometimes CSS), React code is easily organized, searched and maintained.
These improvements are what make React so awesome to develop with. Making non-breaking changes once and having them flow through the rest of the app in a highly performant, intelligent way takes a lot of the heavy lifting out of web app development. That means you can get to higher performance, higher-quality web apps in less time—without pulling out (as much of) your hair.
What is React-Native?
Having conquered this batch of seemingly insurmountable web-app dev issues, Facebook moved on to the next insurmountable development issue it needed to address: mobile apps. As the most popular digital platform in the world, a framework was needed to build high-performance mobile apps that would work across every iOS and Android device imaginable. Knowing that they were not alone in facing these challenges, Facebook developed and released React-Native, a new mobile app development framework built on React.
Who Uses React and React-Native
One of the best parts about React and React-Native is its proliferation in the marketplace. Most high-tech companies deploy React in their infrastructure in some way. (Even if their entire app isn’t built in React, it’s probably being used for some part of it.) Facebook, AirBnB, Instagram, the New York Times and many others are also using React-Native to develop and deploy cross-platform mobile apps to iOS and Android. Because React and React-Native are now open source, these major companies, along with the greater React community, provide substantial resources and in-depth testing in order to improve both platforms in a rapid way. Overall, React and React-Native have reached a level of maturity and dependability that make them viable options for development projects of any size.
Key Takeaways: React Makes Apps More Affordable and More Flexible
As an agency, we are using React and React-Native more and more to provide the highest-quality products for our clients without destroying their budgets. While it’s clear that React and React-Native provide an unprecedented amount of durability, flexibility and manageability, it’s also incredibly fun to develop in. It’s a win-win: our clients benefit from all of the efficiencies React provides, and I get to look forward to building extremely complicated applications in a way that won’t cause night terrors.
But don’t take my word for it! I highly recommend reading up on React and React-Native straight from the horse’s mouth. Both are available via Facebook’s GitHub pages. Still got that Luther Vandross on? There are thousands of additional resources online if you want more real-world examples of these frameworks in action.