Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Import local dependencies
import Api from './api.js';
* Use the Axios Api object to call the /wp/v2/posts
* endpoint and retrieve the 10 latest posts.
Api.get('/wp/v2/posts', {}).then(function (response) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment