WordPress Contributors Propose New Interactivity API for Frontend Blocks
Over the past year a group of WordPress contributors have been working on making it easier for developers to build interactive blocks. These are the kinds of experiences that allow visitors to submit a form and get feedback without reloading the page, load paginated content without refreshing, and improve e-commerce stores with more dynamic responses based on visitor interaction.
A new proposal for an Interactivity API aims to provide a standard way for developers to add interactivity to the frontend, making it faster to build these experiences without reinventing the wheel every time.
Automattic-sponsored core contributor Mario Santos cast the vision for what the new API will deliver:
What if effortlessly creating performant, fluid, and idiomatic frontend interactivity on block-based WordPress sites was possible? Imagine plugins providing interactions like “heart this post” or “add to cart” without page reloads. Picture instant search, commenting, and native full-page transitions as best-in-class built-ins without complex scaffolding or external tools. Envision achieving this in any block theme by default without sacrificing PHP server rendering and the plugin ecosystem for a JS runtime. Visualize block developers easily declaring and extending such behaviors in a way that is immediately familiar and compatible with the block ecosystem.