Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

328
Views
react-native-camera was not found in the UIManager

So im using react-native-camera to scan barcodes in my app. But since i have upgraded my react native version it doesnt work anymore. It shows the error below :

Invariant Violation: requireNativeComponent: "RNCamera" was not found in the UIManager.

Here is the code and how i use it:

import { RNCamera } from 'react-native-camera';

const scanRef = createRef();

<RNCamera
              key={'scan_camera'}
              ref={scanRef}
              style={styles.RNCamera}
              type={RNCamera.Constants.Type.back}
              playSoundOnCapture={true}
              androidCameraPermissionOptions={{
                title: 'Permission to use camera',
                message: 'We need your permission to use your camera',
                buttonPositive: 'Ok',
                buttonNegative: 'Cancel',
              }}
              barCodeTypes={allowedBarcodeTypes}
              onGoogleVisionBarcodesDetected={({ barcodes }) => {
                if (barcodes.length) {
                  const barcode = barcodes[0];
                  const barcodeData = barcode.data;
                  // const barcodeType = barcode.type;
                  this.props.onBarCodeRead(barcodeData);
                  // close modal
                  closeModal();
                }
              }}
            >

              {
                ({ camera, status }) => {
                  if (status !== 'READY') return (<View style={styles.RNButtons}><Text>Loading...</Text></View>);
                  return (
                    <View style={styles.RNButtons}>
                      <TouchableOpacity style={[styles.RNButton, { backgroundColor: 'red' }]} onPress={() => closeModal()}>
                        <Text style={[styles.RNButtonText]}>{I18n.t('close').toUpperCase()}</Text>
                      </TouchableOpacity>
                    </View>
                  )
                }
              }
            </RNCamera>

I've tried almost everything, installed the package manually acording to the doucmentation but with no luck. My react version is "0.67.3"

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!