SVGs in JavaScript: fast, single-render performance

svg

By inlining SVGs into the HTML using React (rather than passing SVG iles to <img> tags)….

function MyIcon(props) {
  return (
    <svg
      {...props}
      className={styles({
        /*...*/
      })}
    >
      <path d="M17.5 ... 25.479Z" />
    </svg>
  );
}

External references

< back to index