How to build client-side filtering, search, and pagination for query grids using WordPress 6.5+ Interactivity API without heavy React or jQuery dependencies.

For years, creating interactive frontend grids required enqueuing heavy JavaScript frameworks—often bundling React, ReactDOM, or jQuery just to filter a grid of 12 posts. This heavily penalized Core Web Vitals, especially Total Blocking Time (TBT).
WordPress 6.5 introduced the native Interactivity API, a standardized reactive framework designed specifically for blocks. It delivers reactive client-side navigation and filtering using declarative HTML directives.
<div data-wp-interactive="myPlugin" data-wp-context='{ "selectedCategory": "all" }'>
<button data-wp-on--click="actions.filterPosts">Filter</button>
</div>The beauty of this pattern is progressive enhancement: initial HTML is fully rendered by PHP, so search engine spiders see 100% of the content. When JavaScript is enabled, clicks intercept the request and morph the DOM via lightweight reactive signals without a full page reload.