An open API service indexing awesome lists of open source software.

https://github.com/rodentman87/react-svg-dedupe

SVG De-duplicator for React!
https://github.com/rodentman87/react-svg-dedupe

Last synced: about 1 year ago
JSON representation

SVG De-duplicator for React!

Awesome Lists containing this project

README

          

# Deduped SVG

Deduped SVG moves svgs out of the normal flow of the document and instead places it in a single location and renders a reference to it in place. To use the library, simply add a `DedupedSVGRenderer` at the top level of your app as the _very_ last thing rendered, and then render the deduped svgs like this:

```tsx

{/* inside */}

```

All instances of DedupedSVG with the same `id` will instead be replaced with a reference to the single SVG being rendered.