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

122
Views
Se produjo un error de procesamiento de almacenamiento asíncrono nativo de reacción a pesar de que se llamó e implementó tal como está en los documentos

ERROR TypeError: indefinido no es un objeto (evaluando '_$$_REQUIRE(_dependencyMap[6], "@react-native-async-storage/async-storage").AsyncStorage.getItem')

Este error se encuentra en: en la aplicación (en renderApplication.js:48) en RCTView (en View.js:32) en View (en AppContainer.js:106) en RCTView (en View.js:32) en View (en AppContainer.js:133) en AppContainer (en renderApplication.js:41)

Blockquote mi código: `

 import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import OnboardingScreen from './Component/Onboardingscreen'; import LoginScreen from './Component/Loginscreen'; import { AsyncStorage } from '@react-native-async-storage/async-storage'; import { useEffect } from 'react'; const AppStack = createStackNavigator(); const App =() => { const [isFirstLaunch, setIsFirstLaunch,] = React.useState(null); useEffect(() => { AsyncStorage.getItem('alreadyLaunched').then(value => { if(value == null) { AsyncStorage.setItem('alreadyLaunched','true'); setIsFirstLaunch(true); } else { setIsFirstLaunch(false); } }); }, []); if (isFirstLaunch == null) { return null; } else if ( isFirstLaunch == true ){ return ( <NavigationContainer> <AppStack.Navigator headerMode='none' > <AppStack.Screen name="OnboardingScreen" component={OnboardingScreen}/> <AppStack.Screen name='login' component={LoginScreen} /> </AppStack.Navigator> </NavigationContainer> ); } else { return <LoginScreen />; } } export default App;

`

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Como se indica en los documentos , AsyncStorage debe importarse como una importación predeterminada en lugar de una importación con nombre.

Así que reemplaza:

 import { AsyncStorage } from '@react-native-async-storage/async-storage';

por:

 import AsyncStorage from '@react-native-async-storage/async-storage';
about 4 years ago · Juan Pablo Isaza Report
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!