Last active
July 7, 2016 09:48
-
-
Save kazagkazag/dfc48ef9ad01f50c6b20cddfb48459f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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