我低于警告
AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage

我該如何壓制它?
我已經嘗試了以下方法(放在下面的行中app.js),但沒有一個有效。
import { LogBox } from 'react-native'
LogBox.ignoreLogs(['Warning: AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from `@react-native-async-storage/async-storage` instead of `react-native`. See https://github.com/react-native-async-storage/async-storage'])
import { LogBox } from 'react-native'
LogBox.ignoreLogs(["Warning: AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage"])
誰能幫我壓制它?
uj5u.com熱心網友回復:
它是一個警告。不要壓制它。我猜你正在使用“react-native”包中的異步存盤。而是從這里安裝@react-native-async-storage/async-storage和使用它。
uj5u.com熱心網友回復:
import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Asyncstorage: ...']); // Ignore log notification by message
LogBox.ignoreAllLogs(); //Ignore all log notifications
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/418963.html
標籤:
