Closed mccm2310 closed 1 year ago
Yes there is -> onError event.
<ReactCountryFlag
className="h-4 w-4"
countryCode={movie.lang.toLowerCase()}
svg
onError={() => console.log('error')} />
@keytrap-x86 thank you for that example!
@mccm2310 this library is just a wrapper around an img tag for SVG flags, and a span tag for emoji's, all props pass through so the comment above is a perfect example of that
There is no way to handle a query error if the countryCode doesn't exist in cdnjs flags. For example, 'GZ' or 'AN'.