Invalid ReactNative setting status bar StatusBar

problem: < StatusBar / > component is invalid. There is no
description of the reaction at all: the
project is initialized with expo.

add: use the Expo.Constants.statusBarHeight method to get the height of the status bar, and then add an empty View to simulate a status bar
but still don"t know: < StatusBar / > why the component is invalid

previous simplest test demo

import React from "react";
import {
    StyleSheet,
    View,
    Text,
    StatusBar
} from "react-native";
import { Constants } from "expo";



export default class StatusBarDemo extends React.Component {
    render() {
        return (
            <View style={styles.container}>
                {/* <View style={styles.statusBar} /> */}
                <StatusBar
                    backgroundColor="blue"
                    barStyle="light-content"
                />
                <View style={styles.content}>
                    <Text>this is a test</Text>
                </View>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    statusBar: {
        backgroundColor: "-sharpC2185B",
        height: Constants.statusBarHeight,
        color: "red"
    },
    container: {
        flex: 1,
    },
    content: {
        flex: 1,
        backgroundColor: "red"
    }
});
Oct.09,2021

<StatusBar
    animated={true}
    hidden={false}
    androidtranslucent={true}
    barStyle="light-content"
    backgroundColor="-sharp6ca8f1"
/>

I write this as OK


add these to the expo of app.json, and subsequent changes to statusBar will take effect

"androidStatusBar": {
  "backgroundColor": "-sharpffffff",
  "barStyle": "light-content"
},
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c00e-2b640.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c00e-2b640.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?