Here's a list of the main features included in Frontity's core:
Everything is already wired up you can focus on building your site: React, webpack, Babel, SSR, 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 the SEO is not harmed.
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: it allows you to easily add new features to your theme via extensions and NPM packages without having to create them from scratch.
We are working on a lot of Frontity extensions which will be available soon. You can check them out here. Some examples are Yoast SEO, AdSense, SmartAds, DoubleClick for Publishers, OneSignal Push Notifications, Disqus, Google Analytics, Google Tag Manager, or ComScore.
Apart from these extensions, there are many other interface tools specifically created for Frontity: context routing, swipe navigation, infinite scrolling, html-to-react, gutenberg-to-react, etc.
Our themes can also use any of the 80.000 React packages currently available in npm.
As part of our mission to make building sites with WordPress and React easier and more accessible, we also want to develop the framework focused on this aspect. Frontity is perfectly accessible by default and will provide tools that let the developers know if they break it.
We’re open sourcing the internal framework we’ve been using to power big WordPress news sites during the last year. Used by million readers, Frontity is proven and ideal for building engaging frontend experiences.
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 first beta version includes a “wp-source” which works with the REST API of any wordpress.com or wordpress.org site. This way, whether you have a self-hosted site or it is hosted by Automattic, Frontity will suit your needs.
Frontity has been designed so it can support other sources in the future (like the GraphQL API for WordPress). Actually, we are discussing possible future sources here in the community. Feel free to join the conversation and share any ideas you might have.
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.
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.