- Added React v19 to
peerDependencies
(#381)
- Added support for new
boostLevel
prop, allowing the disabling of the underlying encoder's default of automatically boosting the ECL. (#374) - Added support for accepting an array of strings for
value
, which enables encoding of each part into independent segments. (#374)
- Improved support for dual publishing of ESM/CJS modules for better compatibility with tools. (#301, #368)
- Mitigated warnings when using QRCodeSVG in server components (#352)
- Added
@deprecated
JSDoc to default export for additional visibility in editors to TypeScript users.
- Corrected issue with loading types in Typescript when configured with
"moduleResolution": "Bundler"
or"module": "ESNext"
. (#368)
- Added proper support for
ref
, enabling direct access for underlyingcanvas
orsvg
nodes. This also resulted in much more accurate type defitions. (#202) - Added support for
marginSize
prop, replacing the now deprecatedincludeMargin
. This enables margins of any value, not just0
or4
. (#281) - Added Support for Setting Image Opacity via
imageSettings.opacity
(#292) - Added
minVersion
prop to give better control over QR Code generated (#323) - Added support for specifying
cross-origin
for embedded images viaimageSettings.crossOrigin
. (#324)
- Improved accessibility for
QRCodeSVG
by rendering a<title>
node instead of setting atitle
attribute. (#284) - Improved accessibility with explicit
role
set on rendered SVG and Canvas. (#321) - Improved documentation (#358)
- Used better types in TypeScript for ErrorCorrectionLevel, resulting in better developer experience. (#291)
- The
includeMargin
prop has been deprecated in favor ofmarginSize
. (#281)
- Removed default export which was deprecated in v3. (#208)
- Remove explicit
style
prop. This still works identically as it was passed through and the type definitions are unaffected as they were improved via theref
changes (#357)
- Improved support for dual publishing of ESM/CJS modules for better compatibility with tools. (#301)
- Set explicit display names for improved debugging experience. (#304)
- Improved SVG compatibility by using
href
in place ofxlink:href
for embedded images. (#336) - Mitigated warnings when using QRCodeSVG in server components (#352)
- Made optional props optional, removing use of
defaultProps
. This may be a slight behavior change with TypeScript if previously passingnull
. - Fixed used of
shapeRendering="crispEdges"
in SVG component.
- Fixed TypeScript types to reflect pass through of DOM props.
- Updated qr-code-generator to https://github.com/nayuki/QR-Code-generator/commit/d524de615364fe630040b208b4caa14b6cd8e526
- Added React v18 to allowed peer dependencies.
- Added support for named exports for
QRCodeSVG
andQRCodeCanvas
. - Added support for ES Modules.
- Added embedded type definitions.
- Swapped out
qr.js
dependency for vendored version of https://www.nayuki.io/page/qr-code-generator-library. - Rewrote using hooks.
- Deprecated support for default export. This will be removed in v4.
- Removed support for React < 16.8.
- Switched to using
unsafe_*
lifecycle methods, eliminating a warning from non-production environments.
- Removed support for React < 16.3.
- Added React v17 to allowed peer dependencies.
- Handle mounting server rendered content properly.
- Handle updates to embedded image properly.
- Support for embedding image into QR Code.
- Remove
PropTypes
in production environments.
- Updated Path2D detection to exclude browsers which don't support string constructor (Edge).
- Properly support new
includeMargin
prop in the canvas renderer.
- Consume non-DOM prop in canvas renderer to prevent spurious warnings from React.
- Support for
includeMargin
prop, to include the "quiet zone" in rendering
- Updated canvas renderer to use Path2D (where available), and simplify the render. This fixes some rendering inconsistencies.
- Switched to using
React.PureComponent
instead of a customshouldComponentUpdate
method.
- New
renderAs
prop, with support for rendering to SVG. This is a more versatile target for high quality visuals. - Support for
style
,className
, and any other DOM props that might be passed through (e.g.data-*
). - Support for proper encoding of multibyte strings (Chinese, Japanese, Emoji, etc.).
- Added support for React v16
- Removed
flow-bin
fromdependencies
- Removed support for React < 15.5
- Extended support to React v15
- Added support for specifying the Error Correction level (e.g.
level="H"
)
- Default Error Correction level is now
'L'
(was implicitly'H'
)
- Fixed bug preventing usage in IE < 11
- Extended support to React v0.14
- Added support for HiDPI screens by scaling the
<canvas>
- Added
shouldComponentUpdate
bailout to prevent unnecessary rendering