Почему {amp}lt;QRScanner/{amp}gt; не отображается на моем устройстве? Если я запускаю проект только со сканером, то все работает, но как только я переношу его в другой файл, он сломается

введите описание изображения здесь

App.js

  import React, { Component } from 'react'; import { StyleSheet, View } from 'react-native'; import { QRScanner } from './src/Scanner'; import { Navbar } from './src/Navbar' const instructions = Platform.select({ ios: 'Press Cmd R to reload,n'   'Cmd D or shake for dev menu', android: 'Double tap R on your keyboard to reload,n'   'Shake or press menu button for dev menu', }); export default class App extends Component { render() { return ( {amp}lt;View{amp}gt; {amp}lt;Navbar title='QR Scanner'/{amp}gt; {amp}lt;View style={styles.view}{amp}gt; {amp}lt;QRScanner/{amp}gt; {amp}lt;/View{amp}gt; {amp}lt;/View{amp}gt; ) } } const styles = StyleSheet.create({ view: { flex: 1, flexDirection: 'column', justifyContent: 'flex-end', }, }) 

сканер

  import React, { useState, useEffect } from 'react'; import { Text, View, StyleSheet, Button } from 'react-native'; import { BarCodeScanner } from 'expo-barcode-scanner'; export const QRScanner = (props) ={amp}gt; { const [hasPermission, setHasPermission] = useState(null); const [scanned, setScanned] = useState(false); useEffect(() ={amp}gt; { (async () ={amp}gt; { const { status } = await BarCodeScanner.requestPermissionsAsync(); setHasPermission(status === 'granted'); })(); }, []); const handleBarCodeScanned = ({ type, data }) ={amp}gt; { setScanned(true); alert(`${type} ${data}`); }; const putOnServer = ({ type, data }) ={amp}gt; { console.log('1') }; if (hasPermission === null) { return {amp}lt;Text{amp}gt;Requesting for camera permission{amp}lt;/Text{amp}gt;; } if (hasPermission === false) { return {amp}lt;Text{amp}gt;No access to camera{amp}lt;/Text{amp}gt;; } return( {amp}lt;View{amp}gt; {amp}lt;BarCodeScanner onBarCodeScanned={scanned ? undefined : handleBarCodeScanned} style={StyleSheet.absoluteFillObject} /{amp}gt; {scanned {amp}amp;{amp}amp; ( {amp}lt;Button title={'Tap to Scan Again'} onPress={ pressHandler } /{amp}gt; )} {amp}lt;/View{amp}gt; ) }