Changes to the Interactivity API in WordPress 7.0

New watch() function WordPress 7.0 adds a watch() function to the @wordpress/interactivity package. This brand-new function subscribes to changes in any reactive value accessed inside a callback—and reruns it anytime those values change. Now, you can tie the Interactivity API’s data-wp-watch to a DOM element’s lifecycle and use that for reacting to state changes. But … Continue reading Changes to the Interactivity API in WordPress 7.0