Skip to content

Instantly share code, notes, and snippets.

@kazagkazag
Last active July 7, 2016 09:48
Show Gist options
  • Save kazagkazag/dfc48ef9ad01f50c6b20cddfb48459f5 to your computer and use it in GitHub Desktop.
Save kazagkazag/dfc48ef9ad01f50c6b20cddfb48459f5 to your computer and use it in GitHub Desktop.
// Message.jsx
export default class Message extends Component {
render: function() {
return <p>{this.props.children}</p>
}
}
// MyComponent.jsx
// import Message from "Message"
export class MyComponent extends Component {
render() {
return (
<div className="my-div">
My div content
<Message>Some message</Message>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment