@cpchain-foundation/react-native-barcode-reader
v0.0.1
Published
react native barcode reader
Downloads
4
Readme
react-native-barcode-reader
react native barcoder reader
Installation
npm install @cpchain-foundation/react-native-barcode-reader
Usage
import { decode } from '@cpchain-foundation/react-native-barcode-reader';
const base64Image = `data:image/png;base64,...`;
export default function App() {
const [result, setResult] = React.useState<string | undefined>();
React.useEffect(() => {
decode(base64Image.replace('data:image/png;base64,', '')).then(setResult);
}, []);
return (
<View style={styles.container}>
<Image style={styles.img} source={{ uri: base64Image }} />
<Text>Result: {result}</Text>
</View>
);
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library