Let’s walk through a few common AJAX patterns and compare how they look and work using the WP REST API instead of custom admin-ajax hooks and functions.
Specifically, we’ll look at code samples for infinite scolling/load more buttons, look-ahead search, and interacting with a totally custom data set (custom post type and custom post meta).
Throughout the process we’ll talk about what you get for free from the REST API, what you have to build yourself, and review real, working code so that you can build smarter and faster solutions.