How the block pipeline turns fields into components

A block starts as a JSON file of fields and ends as a React component. Here is every step in between.

Engineering
Content modelling
Headless
NP–95 · Engineering

Every custom block has a fields file. WordPress reads it to build the editor form; the front end reads the saved values to render the block.

The steps

  1. The fields file defines what an editor can enter.
  2. The plugin registers it as an ACF block.
  3. The router returns the saved values with the page.
  4. The front end looks the block up in its registry and renders it.

Because both sides read the same file, a new field shows up in the editor and in the component's data at the same time.