Skip to content

Instantly share code, notes, and snippets.

@srph
Created February 3, 2017 07:36
Show Gist options
  • Select an option

  • Save srph/865569a84f6aa3626ba31eb47acda4d3 to your computer and use it in GitHub Desktop.

Select an option

Save srph/865569a84f6aa3626ba31eb47acda4d3 to your computer and use it in GitHub Desktop.
React: html entity component. Because Buble won't let me use html entities
import React from 'react';
const Entity = ({char}) =>
<span dangerouslySetInnerHTML={{ __html: `&${char};` }} />
Entity.propTypes = {
char: React.PropTypes.string.isRequired
};
export default Entity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment