Skip to content
Studio Champ Gauche edited this page Mar 30, 2026 · 10 revisions

ReactWP Wiki

Welcome to the ReactWP wiki.

This documentation is meant to explain how the framework works, how its main systems fit together, and where to customize or extend it.

ReactWP is a hybrid WordPress + React foundation where:

  • WordPress provides content, query context, and the initial route
  • React provides the application layer, route rendering, transitions, and runtime behavior
  • the loader, cache, and asset systems coordinate the visual experience around each route

Start here

If you are new to ReactWP, start with these pages:

Then continue with the core runtime docs:

Core runtime

These pages explain how the frontend application behaves at runtime:

  • Routes Explains how ReactWP resolves, creates, and updates routes across WordPress, REST, and React.
  • Loader Explains critical asset loading, preload vs display, media rendering, and loader animation behavior.
  • Page Transitions Explains the navigation pipeline, route blocking, cleanup, proceed timing, and enter/leave animations.
  • Cache Explains RWPCache, in-memory reuse, Cache Storage, pending request deduplication, and invalidation.
  • Assets Explains critical asset declarations, route-selected groups, and the structure expected by the loader.
  • Templates Explains how route payloads resolve React templates and what props templates receive.
  • Template Conventions Recommends a clear strategy for naming, assigning, and organizing templates.
  • SEO Explains the hybrid SEO model across PHP-rendered head output and client-side meta updates.
  • REST API Explains REST route access policy and the current /reactwp/v1/route endpoint.
  • Globals Explains the main globals used by the framework and how to interpret them.
  • Hooks Lists the main extension points exposed by ReactWP and where they are used.

PHP API

These pages explain the PHP helpers exposed by the ReactWP mu-plugin:

  • PHP API Overview of the public rwp::... facade.
  • Fields and Replacements Explains rwp::field() and the replacement system used across PHP and REST output.
  • Content Queries Explains rwp::cpt() and the shared query defaults system.
  • Menus Explains rwp::menu(), theme locations, and menu-related conventions.
  • Sources Explains rwp::source() for theme-relative paths and URLs.
  • Sanitizing and Escaping Explains rwp::sanitize() and rwp::escape().

Framework setup

These pages explain the project-level setup behavior provided by the mu-plugin and framework:

  • Admin Setup Explains Site Settings, Theme Settings, language setup, theme locations, media groups, and React template admin fields.
  • First Load Explains the one-time bootstrap routine used to initialize a fresh ReactWP installation.
  • Project Structure Explains how src/, configs/, and dist/ are organized.
  • Customization Explains where to customize templates, routes, assets, animations, and SEO.

Extension and maintenance

These pages are useful when evolving ReactWP or working on bigger changes:

  • Adding a Route Type Explains how to extend the route system without breaking the route contract.
  • Current State Summarizes what already feels strong in the framework and what is still evolving.
  • Limitations Lists current tradeoffs and boundaries worth keeping in mind.

Practical examples

If you want quick copy-paste examples, use:

This page includes short examples for tasks such as:

  • adding a custom SEO tag
  • declaring critical assets
  • allowing a REST route
  • registering a loader animation
  • registering page transition animations
  • reading fields with rwp::field()

Suggested reading paths

If you want to understand the framework fast

If you want to customize the frontend experience

If you want to work mostly in PHP

If you want to extend the framework

Philosophy

ReactWP is not trying to disconnect WordPress from the frontend.

It keeps WordPress useful for:

  • content
  • query context
  • SEO-sensitive first render
  • ACF-driven data
  • editorial workflows

while giving the frontend a more structured application layer through React.

Summary

This wiki is organized around three goals:

  • explain the framework
  • show where to customize it
  • make it easier to extend without breaking its core ideas

If you are not sure where to begin, start with:

Clone this wiki locally