{"id":20387,"date":"2024-01-04T16:46:10","date_gmt":"2024-01-04T23:46:10","guid":{"rendered":"https:\/\/phoenix.wordcamp.org\/2024\/?post_type=wcb_session&#038;p=20387"},"modified":"2024-02-09T11:19:09","modified_gmt":"2024-02-09T18:19:09","slug":"what-is-the-interactivity-api-and-why-do-i-care","status":"publish","type":"wcb_session","link":"https:\/\/phoenix.wordcamp.org\/2024\/session\/what-is-the-interactivity-api-and-why-do-i-care","title":{"rendered":"What is the Interactivity API and Why Do I Care?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Your typical Gutenberg block doesn\u2019t do much once it\u2019s been displayed within a post or page. Even if you use dynamic rendering to present the block, whatever ends up on the page visitor\u2019s screen won\u2019t really _do_ much, at least not without forcing a page reload. But here&#8217;s the thing: The same React-like approach that makes the WordPress page editor _do_ stuff while you\u2019re 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\u2019s 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your typical Gutenberg block doesn\u2019t do much once it\u2019s been displayed within a post or page. Even if you use dynamic rendering to present the block, whatever ends up on the page visitor\u2019s screen won\u2019t really _do_ much, at least not without forcing a page reload. But here&#8217;s the thing: The same React-like approach that [&hellip;]<\/p>\n","protected":false},"author":20187421,"featured_media":0,"template":"","meta":{"_crdt_document":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_wcpt_session_time":1707496200,"_wcpt_session_duration":3300,"_wcpt_session_type":"session","_wcpt_session_slides":"https:\/\/peakzebra.com\/wcphx-2024-slide-deck\/","_wcpt_session_video":"","_wcpt_speaker_id":[20385],"footnotes":""},"session_track":[67],"session_category":[61,54,56],"class_list":["post-20387","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-classroom","wcb_session_category-advanced-development","wcb_session_category-block-editor","wcb_session_category-general-wp"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"February 9, 2024","time":"9:30 am"},"session_speakers":[{"id":"20385","slug":"robert-richardson","name":"Robert Richardson","link":"https:\/\/phoenix.wordcamp.org\/2024\/speaker\/robert-richardson"}],"session_cats_rendered":"Advanced Development, Block Editor, General WP","_links":{"self":[{"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/20387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/20387\/revisions"}],"predecessor-version":[{"id":21280,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/sessions\/20387\/revisions\/21280"}],"speakers":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/speakers\/20385"}],"author":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wporg\/v1\/users\/peakzebra"}],"wp:attachment":[{"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/media?parent=20387"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/session_track?post=20387"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2024\/wp-json\/wp\/v2\/session_category?post=20387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}