mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
# Summary Due to the large number of example apps in the repository, I decided to change the structure and move all applications into an "apps" folder to maintain a clear structure.
19 lines
421 B
TypeScript
19 lines
421 B
TypeScript
import React from 'react';
|
|
import { SvgUri } from 'react-native-svg';
|
|
|
|
|
|
export default () => {
|
|
const [uri, setUri] = React.useState('https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/not_existing.svg')
|
|
|
|
return (
|
|
<>
|
|
<SvgUri
|
|
onError={() => setUri('https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ruby.svg')}
|
|
width="100"
|
|
height="100"
|
|
uri={uri}
|
|
/>
|
|
</>
|
|
);
|
|
}
|