When building a website, developers have several options for how to build that website. Two of these options are React and WordPress. Both options can build large, scalable and feature-rich websites, but both options go about this in very different ways.
This article will briefly highlight the main pros and cons of choosing React or WordPress for building your website.
React websites are built by creating components that represent parts of each page on your site.
For example, a component might be a login prompt, sidebar, header or footer. Each of these components can have child components or be a child of a parent component.
When the data of a parent component is updated, any children of that parent (and the parent itself) can be rerendered to the screen without reloading. This is the reactful aspect of React.
Building websites in WordPress involves installing the WordPress base installation and then customising the site to your liking. These customisations include choosing a theme for your site and adding plugins to handle user sign-up forms, eCommerce tools and more.
WordPress developers can do even more customising by writing their plugins and themes, but this is the more advanced way of working with WordPress. WordPress could be used without coding to get the website to a finished state in many website types, like blogs or storefronts.
Who would create a website using React?
Typically, only professional developers would create a website using React. A high level of prerequisite knowledge is required before someone can create a quality React site. Even if the site is simple, there is still a lot to learn before someone can finish a site.
React sites are built by businesses with IT teams and solo developers. It would be rare to find a hobbyist who only needs to get a blog site up or even an eCommerce site who would choose React as the first go at writing a website.
Who would create a website using WordPress?
Due to the low bar of prerequisite knowledge required to get a complete site online using WordPress, the WordPress audience is far greater than React’s. You will find many bloggers, small businesses, and consultants who will create their websites using WordPress.
With a large array of hosting providers set up to deploy new WordPress sites easily, a small site with only a few pages could easily be built in a day (provided that the images and text are ready to go when starting).
This speed of deployment and ease of use is attractive to non-developers when wanting to get a website online. WordPress’s community is so broad that information is easy to google when getting stuck, so users shouldn’t be slowed down when working on their websites.
What are the limitations when creating a site in React?
Sure, there may be better ways to accomplish some tasks using other frameworks, but you can still create any website in React.
SEO can be a bit trickier using React than other technologies. There are ways to counteract this trickiness. For example, if you combine React with a framework like nextjs, you can take advantage of solving common issues, like making your site SEO friendly, which are solved by the framework.
React, by design, is very unopinionated about how developers should build their sites. This means that it is up to the developer to decide how to implement all the site components.
For example, if you want to add authentication to your site, you are not locked down to a React-specific way of implementing this. If you want to use a styling framework, you can add the one you want.
This lack of limitations can sometimes make creating sites in React more difficult. With no specific guidelines, you may get a bit lost in how to implement certain features. Or, even worse, you may spend time building components that already exist and are well-tested from third party packages.
What are the limitations when creating a site in WordPress?
In WordPress websites, you are given a dashboard to work from when performing administration tasks on your website. These tasks include writing content, adding plugins or themes, customising these plugins and themes and more.
With these guardrails in place, customising highly specific parts of your site can become difficult if the exact plugin or theme that will solve your problem doesn’t exist.
For example, if you wanted a form to redirect a user to another page on your site when they submit that form, you could easily do that.
If you wanted that page to be displayed with a blue background only when the user enters a home address in Italy, you would struggle to find something that specific to your needs.
To achieve the above, you may need to create a child theme, customise the plugin, or even write your plugin to do this work. The level of coding required to customise these things is quite high compared to the general work needed to run a WordPress site.
Do WordPress sites require more maintenance than React sites?
Generally speaking, React sites would require more maintenance than WordPress sites. One of the reasons for this is that WordPress updates are generally backwards compatible. This means updating old WordPress sites to newer versions won’t break your site during the upgrade.
The same can’t be said for React. Newer versions of React are touted as being backwards compatible but React relies on the network of third-party packages to create worthwhile websites, and the dependencies of these packages (along with outdated dependencies of their own causing security concerns) can be a real pain for developers.
Your site might not break without frequent updates in React, but it certainly can suffer from security concerns. One of the biggest traps in React is when your site relies on a package that stops being supported and updated. You then may be required to update your site to use a new package just so that your site isn’t vulnerable to issues introduced by your dependency.
Both React, and WordPress can build high quality websites. If you require a lot of customisation and programmatic tasks, you should look at using a library like React. React is for professional web developers, whereas most people with no coding experience and a little effort can deploy WordPress websites.