Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active August 30, 2018 19:47
Show Gist options
  • Save Shelob9/03437b564ead1102c559bed2c680ab4e to your computer and use it in GitHub Desktop.
Save Shelob9/03437b564ead1102c559bed2c680ab4e to your computer and use it in GitHub Desktop.
const Post = (props) => {
return (
<div>
<h2>{props.post.title.rendered}</h2>
</div>
)
};
const Posts = props => {
return (
<div>
{props.posts.map(post => {
return <Post post={post} key={post.ID} />;
})}
</div>
);
};
wp scaffold plugin learn-gutenberg
wp scaffold block hello-world --title="Hello World Block" --plugin=learn-gutenberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment