Skip to content

Instantly share code, notes, and snippets.

@kaosat-dev

kaosat-dev/README.md

Last active Sep 29, 2015
Embed
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.  
</svg>`

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

very helpfully provided by https://github.com/Frikki !

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