Socket
Socket
Sign inDemoInstall

react-native-svg

Package Overview
Dependencies
525
Maintainers
3
Versions
235
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 14.0.0 to 14.1.0

react-native.config.js

1

android/src/main/jni/CMakeLists.txt

@@ -56,2 +56,3 @@ cmake_minimum_required(VERSION 3.13)

react_render_imagemanager
react_utils
)

@@ -58,0 +59,0 @@

@@ -646,5 +646,7 @@ "use strict";

onError = _reactNativeSvg.err,
onLoad
onLoad,
fallback
} = props;
const [xml, setXml] = (0, React.useState)(null);
const [isError, setIsError] = (0, React.useState)(false);
(0, React.useEffect)(() => {

@@ -654,4 +656,10 @@ uri ? (0, _reactNativeSvg.fetchText)(uri).then(data => {

onLoad === null || onLoad === void 0 ? void 0 : onLoad();
}).catch(onError) : setXml(null);
}).catch(e => {
onError(e);
setIsError(true);
}) : setXml(null);
}, [onError, uri, onLoad]);
if (isError) {
return fallback ?? null;
}
return /*#__PURE__*/React.createElement(SvgCss, {

@@ -658,0 +666,0 @@ xml: xml,

@@ -636,5 +636,7 @@ import * as React from 'react';

onError = err,
onLoad
onLoad,
fallback
} = props;
const [xml, setXml] = useState(null);
const [isError, setIsError] = useState(false);
useEffect(() => {

@@ -644,4 +646,10 @@ uri ? fetchText(uri).then(data => {

onLoad === null || onLoad === void 0 ? void 0 : onLoad();
}).catch(onError) : setXml(null);
}).catch(e => {
onError(e);
setIsError(true);
}) : setXml(null);
}, [onError, uri, onLoad]);
if (isError) {
return fallback ?? null;
}
return /*#__PURE__*/React.createElement(SvgCss, {

@@ -648,0 +656,0 @@ xml: xml,

2

lib/typescript/css/css.d.ts

@@ -23,3 +23,3 @@ import * as React from 'react';

export declare function SvgCss(props: XmlProps): React.JSX.Element;
export declare function SvgCssUri(props: UriProps): React.JSX.Element;
export declare function SvgCssUri(props: UriProps): React.JSX.Element | null;
export declare class SvgWithCss extends Component<XmlProps, XmlState> {

@@ -26,0 +26,0 @@ state: {

{
"version": "14.0.0",
"version": "14.1.0",
"name": "react-native-svg",

@@ -25,3 +25,3 @@ "description": "SVG library for react-native",

"windows",
"react-native-config.js"
"react-native.config.js"
],

@@ -28,0 +28,0 @@ "react-native-builder-bob": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc