Flickr4Java icon indicating copy to clipboard operation
Flickr4Java copied to clipboard

How to set more than one barcode in a component in React

Open yosim257 opened this issue 3 years ago • 0 comments

React Barcode

How to set more than one barcode in a component in React ???

Your environment

VS

My code.

import React from 'react'; import './CartonLabel.css'; import { useSelector } from 'react-redux'; import { useBarcode } from 'react-barcodes';

const CartonLabel = React.forwardRef((props, ref) => {

const machineDetailsRedux = useSelector(state => state.machine.machineListDetails)

const { inputRef } = useBarcode({ value: machineDetailsRedux.ProductErpID, options: { background: '#ccffff', width: 3, height: 50, // displayValue: false, } } );

return (

<div className='square'>

Product: {machineDetailsRedux.componentName}.{machineDetailsRedux.OpertionNumber}

Crton Number: [I]

Lot:

); });

export default CartonLabel;

Expected behaviour

Want to add another barcode

Actual behaviour

white screen

yosim257 avatar Feb 01 '22 14:02 yosim257