react-native-usb-printer
A React Native Library to support USB printer for Android platform
Installation
npm install react-native-usb-printer --save
Integrate module
To integrate react-native-usb-printer
with the rest of your react app just execute:
react-native link react-native-usb-printer
Usage
; RNUSBPrinterRNUSBPrinterRNUSBPrinterRNUSBPrinter
Example
componentDidMount = async { var devices = await RNUSBPrinter; vendorID = 1155 productId = 22304 let printedSelected = await RNUSBPrinter; this; } { ifthisstateprintedSelected RNUSBPrinter; else console } { ifthisstateprintedSelected RNUSBPrinter; else console } ... { return <View style=stylescontainer> thisstatedeviceList <TouchableOpacity onPress= this> <Text> Print Text </Text> </TouchableOpacity> <TouchableOpacity onPress= this> <Text> Print Bill Text </Text> </TouchableOpacity> </View> } ...