React Native Examples

Working code for each barKoder feature on React Native. Start with the general example, then add what your app needs.

Start here General example A complete scanner screen: the license key, the barcode types to read, the settings and the result. setBarcodeTypeEnabled Open the example →
import React, { useState } from 'react';
import { SafeAreaView, View, Text, Button, StyleSheet, Image, Alert } from 'react-native';
import { Barkoder, BarkoderView } from 'barkoder-react-native';

type ScanResult = {
  textualData: string;
  type: string;
  thumbnailImage: string | null;
};

const BarcodeScanner = () => {
  const [barkoder, setBarkoder] = useState<Barkoder | null>(null);
  const [scannedResult, setScannedResult] = useState<ScanResult | null>(null);
  const [isScanning, setIsScanning] = useState(false);

Scanning modes 4

Hard-to-read codes 2

Documents and IDs 4

Not what you need?Search all the docs, or ask the team.