What is the Interactivity API and Why Do I Care?

Robert Richardson

Your typical Gutenberg block doesn’t do much once it’s been displayed within a post or page. Even if you use dynamic rendering to present the block, whatever ends up on the page visitor’s screen won’t really _do_ much, at least not without forcing a page reload. But here’s the thing: The same React-like approach that makes the WordPress page editor _do_ stuff while you’re working on a post can be used within blocks on the front end of a site. The Interactivity API provides a way to do precisely this. You can add this kind of functionality to blocks you create within a more WordPress-like setting, using PHP on the backend to enable interactions on the front end. As it nears incorporation into the production release of WordPress, it’s not too early to get a sense of what it does and how it works. This talk will discuss some code samples, but is aimed at a general audience with some familiarity of the basic WordPress architecture.