Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-barcode

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-barcode - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

lib/react-barcode.d.ts

9

lib/react-barcode.js

@@ -55,2 +55,3 @@ "use strict";

_this = _possibleConstructorReturn(this, _getPrototypeOf(Barcode).call(this, props));
_this.renderElementRef = _react["default"].createRef();
_this.update = _this.update.bind(_assertThisInitialized(_this));

@@ -82,3 +83,3 @@ return _this;

value: function update() {
var renderElement = getDOMNode(this.refs.renderElement);
var renderElement = getDOMNode(this.renderElementRef.current);

@@ -97,11 +98,11 @@ try {

return _react["default"].createElement("svg", {
ref: "renderElement"
ref: this.renderElementRef
});
} else if (this.props.renderer === 'canvas') {
return _react["default"].createElement("canvas", {
ref: "renderElement"
ref: this.renderElementRef
});
} else if (this.props.renderer === 'img') {
return _react["default"].createElement("img", {
ref: "renderElement"
ref: this.renderElementRef
});

@@ -108,0 +109,0 @@ }

{
"name": "react-barcode",
"version": "1.4.1",
"version": "1.4.2",
"description": "React component to generate barcodes",

@@ -12,2 +12,3 @@ "keywords": [

"main": "lib/react-barcode.js",
"types": "src/react-barcode.d.ts",
"scripts": {

@@ -28,3 +29,3 @@ "lint": "eslint src/ samples/demo.js",

"peerDependencies": {
"react": "^16.0.0 || ^17.0.0"
"react": "^16.0.0 || ^17.0.0 || 18.0.0"
},

@@ -31,0 +32,0 @@ "dependencies": {

@@ -25,2 +25,12 @@ # react-barcode

Or
```js
import Barcode from 'react-barcode';
export const Example: FunctionComponent = () => {
return <Barcode value="barcode-example" />;
};
```
## Options:

@@ -27,0 +37,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc