Skip to content

Instantly share code, notes, and snippets.

@kaosat-dev
Last active September 29, 2015 08:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaosat-dev/39849b9d96c84684665b to your computer and use it in GitHub Desktop.
Save kaosat-dev/39849b9d96c84684665b to your computer and use it in GitHub Desktop.
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