Skip to content

Instantly share code, notes, and snippets.

@Shelob9

Shelob9/4-component.js

Last active Aug 30, 2018
Embed
What would you like to do?
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
You can’t perform that action at this time.