1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

Flareact

  1. About Flareact
  2. Flareact pages
  3. Edge-side rendering
  4. Azion and Flareact
  5. See also

About Flareact

Flareact is an edge-rendered React framework modeled after Next.js.

If you’re used to working with Next.js, you’ll already be familiar with some of the APIs used by Flareact.

With Flareact, your React application is rendered at the edge, rather than on the server. You also don’t need to make the trade-off between a static site and a dynamic application.

Since it’s modeled after Next.js, Flareact supports:

  • File-based page routing.
  • Dynamic page path.
  • Edge-side data fetching APIs.

Flareact goes beyond rendering pages at the edge, having the pages cached at the edge using the Cache API.


Flareact pages

Flareact has all files in the /pages directory matching a pathname with the same filename.

Example:

Let’s say you create pages/azion.js exporting a React component.

  export default function Azion() {
    return <div>The easiest way to build, deliver, observe and secure modern applications.</div>
  }

The page will be accessible at /azion.

pages/
    azion.js

Edge-side rendering

There’s no need to wait on the client-side to render the HTML, because the HTML output is returned in the initial request. This may be helpful for Search Engine Optimization (SEO) and initial time-to-first-paint/time-to-interactive.

To dive deeper into the Flareact world, read the Flareact documentation.


Azion and Flareact

To create a Flareact application on the Azion Platform, you need:

  • An Amazon S3 bucket on Amazon Web Services (AWS) with write and read permissions.
  • An account on the Azion platform with Edge Functions enabled.
  • The Node.js runtime environment, version 16.x or higher, installed in a build environment.
  • The latest Azion CLI version installed.

See how to have a Flareact project up and running on the Azion platform on Creating a Jamstack application on Azion Cells with Flareact framework.


See also