🌱 Fix svgs mask issue using ids in React

Source
const ignoreUpdatedProps = () => true

const IconUsingDefs = React.memo(
  ({ id = Date.now() }) => (
    <svg height="50" width="50" viewBox="0 0 100 100" version="1.1">
      <defs>
        <circle id={`circle${id}`} cx="50" cy="50" r="50" />
      </defs>
      <g stroke="none" fill="none" fillRule="evenodd">
        <mask id={`themask${id}`} fill="white">
          <use xlinkHref={`#circle${id}`}></use>
        </mask>
        <g mask={`url(#themask${id})`} fill="red">
          <rect x="0" y="0" height="100" width="100"></rect>
        </g>
      </g>
    </svg>
  ),
  ignoreUpdatedProps
)
Made by Brandon . If you find this project useful you can donate.