Last active
February 1, 2018 18:33
-
-
Save MaximeHeckel/3c6e99694e7a19ad8ff2114f4d62ca6b to your computer and use it in GitHub Desktop.
Medium - React "sub-components' - Article example 2
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
class MyArticleView extends React.Component { | |
... | |
render() { | |
return ( | |
<Article> | |
<Article.Title>{this.renderTitle()}</Article.Title> | |
<Article.Subtitle>{this.renderSubtitle()}</Article.Subtitle> | |
<Article.Metadata> | |
{this.renderAuthor()} | |
{this.renderDate()} | |
</Article.Metadata> | |
<Article.Content>{this.renderContent()}</Article.Content> | |
<Article.Comments>{this.renderComments}</Article.Comments> | |
</Article> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment