Skip to content

Instantly share code, notes, and snippets.



Last active Sep 29, 2015
What would you like to do?
Cycle.js tips & tricks

Cycle.js tips and tricks

Inline SVGs using JSX

inline svgs seem to have issues when using JSX syntax, so this is a possible workaround:

const mySvg = `<svg height="100" width="100">
      <circle cx="50" cy="50" r="40" stroke="black" fill="red" />
       Sorry, your browser does not support inline SVG.  

const svgContainer = <div innerHTML={mySvg}></div>;

very helpfully provided by !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment