[](https://github.com/prettier/prettier) [](https://greenkeeper.io/) [






SVG processors like SVGO optimize SVG ids which often results in duplicated ids across multiple SVGs. This library tries to fix that by replacing all children ids and id references (#id, url(#id)) in SVG tags with unique generated ids like ___SVG_ID__10__0___.
``bash`
yarn add react-svg-unique-idor
npm install react-svg-unique-id
`typescript
import * as React from 'react'
import { SVGUniqueID } from 'react-svg-unique-id'
export const SVG1 = () => (
)
export const SVG2 = () => (
)
`
If both of these SVGs were not wrapped in SVGUniqueID component there would be an id collision since two html elements would have prefix__bga` as thier id.