In this guide, you’ll learn:
What are the business benefits from using React?
What products is React best for?
Are React apps scalable and easy to maintain?
How does React compare to Angular and Vue?
How to migrate to React?
How to solve React app problems?
Since React is one of the most popular solutions for frontend development, decision-makers often wonder if its popularity equals quality and how exactly a project can benefit from React.
React’s real power lies in how it makes you write your code.Tom Occhino, Engineering Director at Facebook
React code gives you confidence and reliability. The library doesn’t force any code patterns or tech stack solutions. But of course, it’s not a perfect fit for every project and every team. However, this article should give you an answer whether it’s perfect for yours.
Note: To support the decision-making process, we created a complex handbook for CTOs, combining business point of view with tips and precautions from our most experienced developers.
The article below is only the beginning.
To receive notifications when new chapters are published, sign up for updates.
Let’s start with the crucial info about React (and a glimpse of what you can find in the chapters).
A primary building block in React is a component. It’s what allows developers to reuse the code, make it easier to test, scale, and maintain an application. Declarative code and components are the gold of React.
Scalability and maintainability are one of the most important business aspects when choosing technology. Of course, React is suitable for complex applications, which was tested by the biggest players like Bloomberg, Airbnb, or Codecademy.
Thanks to component-based architecture, developers can easily make changes and updates that won’t affect the whole application but only one module.
It’s also convenient to introduce new developers to the team. With modularity, developers can simply extract a separate module and delegate the workload to a new team member.
Also, React is really fast thanks to Virtual DOM. On the contrary to the Real DOM, it exists entirely in memory, intelligently determining what changes to make. The library is also light, which improves the performance even more.
Key take-away: Thanks to components React apps scale easily and are easy to maintain. Virtual DOM helps the app stay light and positively impacts its performance.
Let’s gather up 6 reasons why development teams choose React for frontend development:
- it’s easy to learn, especially for frontend developers,
- it allows to build rich, high-quality User Interfaces,
- it increases developers’ productivity and speeds up the development,
- it is supported by many big companies like Facebook, Uber,
- it is popular so its community is big and active.
What apps is React best for?
SPA (Single-Page Applications) is a default in the case of React but if we use it with external libraries, it becomes perfect also for other solutions.
Since React is built with components, the library makes it easy and convenient to create large-scale apps. Composing and combining components the right way allows developers to take control even over the most difficult architecture. Also, the library is stable and has big players’ support, so it’s a safe solution.
For real-time applications, we need a highly reactive UI, because the changes need to be displayed quickly. React and Redux is a perfect team for that. React works perfectly with event-oriented architecture, when events are sent over web sockets. Redux manages the elements’ state, updates the view when something changes, and allows us to describe what happened declaratively.
It’s time for a few examples of React web development. We’re pretty sure you’re using React applications every day while scrolling through Facebook, Instagram, or watching your favorite tv series on Netflix.
But there are a lot more well-known players who used it. Asana switched from Luna to React when they started to experience problems, especially with scaling.
Among companies using React you’ll also find:
- Khan Academy,
- Yahoo Mail,
- New York Times.
How does React compare to other alternatives?
Angular and React are more similar than you think. That’s because the Angular team did an excellent job with modernizing the framework and decreasing code bundles.
What differs them, is that Angular is a big ecosystem that enforces code patterns and the usage of specific tools, while React is a library for creating UIs that support flexibility in terms of tools and code patterns.
Also, Angular has a different model of thinking, which lies closer to the backend languages. That is why it is easy for backend developers to understand it and code with it. The React learning curve is flatter for frontend developers.
Both frameworks are modern, unopinionated, and support building applications with components. They also use Virtual DOM which improves performance.
What differs React and Vue, is that React has a great community that supports developers. React contributors already created a lot of useful solutions that speed up and ease the development. Since Vue is still fairly new, the community is small and there are not many ready-made solutions.
React Native is a framework based on React.js for writing multi-platform apps for Android and iOS.
If you plan to develop a web and a mobile app, using React and React Native is a perfect solution. Much of the code can be shared between those two, and React developers will catch up with React Native quickly.
React web development with various backends
React is flexible in terms of backend stack. You can choose a technology that fits your project or, for example, location (maybe in your area are lots of Node.js developers and no Golang ones).
React frontends can be paired with such backends as:
- Ruby on Rails
When a legacy app starts to become a problem, React is a solution. It’s modern, it’s constantly improved, and can be paired with any technology stack.
The migration process is easy and thanks to components it can be performed gradually.
Therefore, even large-scale apps can be migrated to React easily. The only catch to a painless migration lies in doing it step by step, one component at a time. Careful planning and strategy make the process easier, more efficient, and prevent breaks in your app’s functioning.
The technologies companies often choose to migrate to React from include:
React performance problems
Let’s start with the fact that Virtual DOM already solves many common performance problems. However, a repeating performance issue in ReactJS is connected to a complex, long list of items. Luckily it is fairly easy to fix – by using virtualized lists.
However, before you choose React, you should know that adding it atop an existing application won’t make it faster or lighter. Quite the opposite. Your team needs to replace a part of the frontend codebase with React ‐ then you will see the expected results.
Search engine indexing problems
Typical React apps, Single-Page Applications, work smoothly but are not SEO-friendly.
If we want our app to be indexed by Google, we need server-side rendering. The best tool for that is Next.js.
With server-side rendering, we prerender the HTML on our server. Then, the crawling bot properly indexes our site, while we maintain the speed and fast loading for our visitors.
The big benefit of React is that you can start small and add more tools to it when you need them.
React is painlessly extensible and doesn’t force developers to use any particular solutions. Also, the React community created many solutions that fit typical use cases such as styling, routing, or state management.
Third-party tools that fit React perfectly:
- Redux for state management
- Socket.io for using web sockets
- Next.js for server-side rendering
- Gatsby to create static websites
These libraries will help you expand your React app:
- Create React App – a command line interface to create a React project easily.
- Material UI – a UI package.
- Styled Components – helps to build small, reusable components responsible for the app’s look.
- MobX – a library for state management.
- Enzyme – a library to test React components, created by AirBnB.
- React Virtualized – it helps to improve the efficiency of the large list and tabular data rendering.
If you’re new to React and Redux combination, here’s a quick tutorial that shows the process of creating a simple React-Redux app step by step.
Top React web development companies
If you experience problems with expanding your React app, migrating from the old stack, or simply seek mentorship and advice, some companies can help you.
The popularity of React can be an advantage and the opposite. On the one hand, many experienced developers know all the best practices and tricks. On the other, popularity makes it hard to find the gems in the crowd.
While choosing a partner for your project, even though it may be challenging, look for the ones who assess your vision, pointing its pros and cons, and show the best possible direction.
Your next steps
Making tech stack decisions is a serious task. If you need to explore React more, the next chapters get into details about React features, and then its scalability, security, and maintenance (crucial points from the business point of view).
Also, remember to subscribe to handbook updates if you liked what’s already here.
This was an introduction to Handbook:
React Web Development: A Practical Guide for CTOs
More chapters are coming!
New content will land on this handbook soon.
Should we notify you?
More chapters are coming!Notify me