qrcode.react
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -31,3 +31,3 @@ var __defProp = Object.defineProperty; | ||
// src/index.tsx | ||
import React, { useRef, useEffect, useState } from "react"; | ||
import React from "react"; | ||
@@ -740,6 +740,6 @@ // src/third-party/qrcodegen/index.ts | ||
const imgSrc = imageSettings == null ? void 0 : imageSettings.src; | ||
const _canvas = useRef(null); | ||
const _image = useRef(null); | ||
const [isImgLoaded, setIsImageLoaded] = useState(false); | ||
useEffect(() => { | ||
const _canvas = React.useRef(null); | ||
const _image = React.useRef(null); | ||
const [isImgLoaded, setIsImageLoaded] = React.useState(false); | ||
React.useEffect(() => { | ||
if (_canvas.current != null) { | ||
@@ -785,3 +785,3 @@ const canvas = _canvas.current; | ||
}); | ||
useEffect(() => { | ||
React.useEffect(() => { | ||
setIsImageLoaded(false); | ||
@@ -788,0 +788,0 @@ }, [imgSrc]); |
@@ -36,4 +36,8 @@ import React, { CSSProperties } from 'react'; | ||
}); | ||
/** | ||
* @deprecated This has been removed in v4. Use named exports instead. | ||
* If relying on an unspecified value for `renderAs`, use `QRCodeCanvas`. | ||
*/ | ||
declare const QRCode: (props: RootProps) => JSX.Element; | ||
export { QRCodeCanvas, QRCodeSVG, QRCode as default }; |
@@ -764,6 +764,6 @@ var __create = Object.create; | ||
const imgSrc = imageSettings == null ? void 0 : imageSettings.src; | ||
const _canvas = (0, import_react.useRef)(null); | ||
const _image = (0, import_react.useRef)(null); | ||
const [isImgLoaded, setIsImageLoaded] = (0, import_react.useState)(false); | ||
(0, import_react.useEffect)(() => { | ||
const _canvas = import_react.default.useRef(null); | ||
const _image = import_react.default.useRef(null); | ||
const [isImgLoaded, setIsImageLoaded] = import_react.default.useState(false); | ||
import_react.default.useEffect(() => { | ||
if (_canvas.current != null) { | ||
@@ -809,3 +809,3 @@ const canvas = _canvas.current; | ||
}); | ||
(0, import_react.useEffect)(() => { | ||
import_react.default.useEffect(() => { | ||
setIsImageLoaded(false); | ||
@@ -812,0 +812,0 @@ }, [imgSrc]); |
{ | ||
"name": "qrcode.react", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "React component to generate QR codes", | ||
@@ -14,2 +14,14 @@ "keywords": [ | ||
"types": "./lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./lib/index.d.ts", | ||
"default": "./lib/esm/index.js" | ||
}, | ||
"require": { | ||
"types": "./lib/index.d.ts", | ||
"default": "./lib/index.js" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
@@ -16,0 +28,0 @@ "build": "yarn run build:code && yarn run build:examples", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72785
8
1789