![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-native-printer-pt220
Advanced tools
React Native Module For PT-220 Thermal Printer
npm i react-native-printer-pt220
Open your project's Info.plist
and add the following lines inside the outermost <dict>
tag:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Need Bluetooth</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Need Bluetooth</string>
You can import images using asset catalog in Xcode.
None
You can import drawables with resource manager in Android Studio.
import * as React from 'react';
import { StyleSheet, View, Button, Platform } from 'react-native';
import { ptConnect, ptSetPrinter, ptPrintText, ptPrintImage, PT_ALIGN_CENTER, ptInit } from 'react-native-printer-pt220';
export default function App() {
const [result, setResult] = React.useState<string>();
const printerName = 'PT-220';
React.useEffect(() => {
if(Platform.OS === 'ios') {
ptInit();
setTimeout(() => {
console.log('Connecting...');
ptConnect(printerName).then(setResult);
}, 2000);
} else {
// call connect right away
console.log('Connecting...');
ptConnect(printerName).then(setResult);
}
}, []);
return (
<View style={styles.container}>
<Button title='Test Print' onPress={() => {
ptSetPrinter(PT_ALIGN_CENTER)
.then(ret => {
console.log(ret);
console.log('Set printer to align center');
ptPrintText('React Native Module Test...\n\n')
.then(pret => {
console.log(pret);
console.log('Text printed...');
ptPrintImage('react_native_logo')
.then(pret2 => {
console.log(pret2);
console.log('Image printed...');
})
.catch(pe2 => {
console.log(pe2);
});
})
.catch(pe => {
console.log(pe);
});
})
.catch(e => {
console.log(e);
});
}} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: 60,
height: 60,
marginVertical: 20,
},
});
FAQs
React Native Module For PT-220 Thermal Printer
The npm package react-native-printer-pt220 receives a total of 2 weekly downloads. As such, react-native-printer-pt220 popularity was classified as not popular.
We found that react-native-printer-pt220 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.