Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixing and Parsing WordPress Rest Api content in React. https://since1979.dev/fixing-and-parsing-wordpress-rest-api-content-in-react/
import React, { useState, useEffect } from "react";
import Axios from "axios";
import WpApiContent from "./WpApiContent.js";
export default function App() {
// ...
return (
<div className="App">
{post && (
<div>
<h1>{post.title.rendered}</h1>
<WpApiContent content={post.content.rendered} />
</div>
)}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.