mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
# Summary A minor change in web example app to fix SVG path and reformat examples with prettier/lint
24 lines
473 B
TypeScript
24 lines
473 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}
|
|
/>
|
|
</>
|
|
);
|
|
};
|