Here's a list of the main features included in Frontity's core:
Everything is already wired up so that you can focus on building your site and spend less time worrying about tooling and configuration: React, Webpack, Babel, Server Side Rendering, Routing, CSS-in-JS, WP REST API, TypeScript, Linting, Testing, and so on.
Frontity sends an HTML that is ready to start navigating the site, so the initial load feels almost instant. No extra assets or round trips are necessary.
Once React has loaded, our router prefetches other routes and data automatically. Users never have to wait when they navigate inside the app.
Frontity responds with a fully populated HTML file generated with React. This reduces the time required for the first contentful paint and ensures that it is optimized for search engines.
The content is retrieved using the WordPress REST API. Once React is loaded in the browser, it takes control of the page and does its magic.
One of the most amazing things about Frontity is its extensibility, similar to that of WordPress itself. It allows you to easily add new functionality and expand the capabilities of Frontity via npm packages without having to create them from scratch.
Frontity packages and themes can also be activated and deactivated without code changes and are reusable across projects, helping reduce both development and maintenance times.
Check out the API Reference docs to see a full list of Frontity packages (including themes) and learn more about the different types of packages.
Frontity themes can also use any of the 80.000 React packages currently available in npm.
In 2019 the Frontity team decided to open-source the internal React framework they had been using to power large WordPress news sites for the previous few years. Used by millions of readers, Frontity is proven and ideal for building engaging frontend experiences. Learn more here.
The Frontity server is so small it suits perfectly the serverless requirements. That means infinite scaling for the frontend.
All the server code is bundled in one file, ready to work with serverless services like Vercel (using its CLI
now) or AWS Lambda. Frontity is also prepared to scale horizontally in any Node.js server.
One in ES6 without transpilation or polyfills so it’s as small and fast as possible.
The other in ES5 for the old browsers that don’t support ES6.
Modern browsers that support ES6 modules will request the ES6 bundle, translating into a reduced bundle size and shorter evaluation time in the browser. This guarantees that performance is not harmed in the modern browsers while ensuring backwards compatibility with the old ones.
Frontity can work with different “source” extensions. The 1.0 version includes a
wp-source package which works with the REST API of any wordpress.com and wordpress.org site. This way, whether you have a self-hosted site or it is hosted by Automattic, Frontity will suit your needs.
The framework has been designed so it can support other sources in the future (like the GraphQL API for WordPress).
This is something similar to WordPress multisite: Frontity allows you to serve any number of sites with just one installation. This can be really useful for users who manage different clients or those who want to create a network.
Frontity uses Webpack to split the code and send the minimum code required for the app to work. It also allows developers to dynamically load components with the help of loadable-components. Learn more about this feature in the Performance section.
Frontity helps build sites which are fast to deliver better user experiences. That's the reason why we have tried very hard to make the core as small as possible. It has finally been reduced by 60% and only weights 60kb (gzipped).
The React team is working hard to release Concurrent Mode, which is a set of features that will improve the user experience of React apps and Frontity will be compatible with it.