gilbarbara / react-inlinesvg

An SVG loader component for ReactJS

Home Page:https://codesandbox.io/s/github/gilbarbara/react-inlinesvg/tree/main/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there any way to load default svg?

dhruv-tank opened this issue · comments

How to load default svg in case of 'missing src' or any other error occured during loading svg?

Hey,

There's no concept of default in this library.

You could change the src in case of an error using a combination of internal state and the onError callback.
Or set a fallback as children.