Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function createMarkup(html) {
return { __html: html };
}
const RedditPost = ({
post: { title, selftext, id, url, thumbnail },
order
}) => (
<div className="redditPost">
<p className="postTitle">
<a href={url} target="_blank">
#{order} {title}
</a>
</p>
<div
className="redditText"
dangerouslySetInnerHTML={createMarkup(selftext)}
/>
</div>
);
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.