Developer Hours: Building custom blocks with the Interactivity API

Speaker: Damon Cook, Nick Diego

The Interactivity API was recently released in WordPress 6.5. Now is the time to experiment with the API and incorporate interactions into your custom blocks, but where should you start?

Often, the best way to learn is through real-world examples. In this Developer Hours session, Damon Cook from WP Engine demonstrates how he built a form submission block that leverages the API. This example will teach you how to kickstart a custom interactive block using the Create Block package, use directives to assign critical attributes to your HTML markup, create the store, and hook up the client-side JavaScript.

Resources:

Damon’s demo plugin: https://github.com/colorful-tones/feedback-block
Interactivity API documentation: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-interactivity/
Tutorial on building a custom block: https://developer.wordpress.org/block-editor/getting-started/tutorial/

Comments

Leave a Reply

Video details


Discover more from WordPress.TV

Subscribe now to keep reading and get access to the full archive.

Continue reading