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

161
Views
La lógica condicional en una matriz no funciona correctamente - React Native

Estoy tratando de crear solo un componente de vista cuando la matriz tiene datos. La matriz comienza vacía: se llena a través de la API al hacer clic en el elemento. Algunos elementos tienen datos de este punto final de API y otros no tienen ningún valor que devuelva como Object [[Prototype]]: Object No importa qué condicional haga, no funciona.

Estoy tratando de dejar que se cree esta vista solo si ese punto final tiene datos para esa matriz si no crea la vista.

 this.state = { cryptoTradingSignals: [], } fetchCryptoStats(selectedCrypto) { getCryptoTradingSignals(selectedCrypto).then(cryptoTradingSignal => this.setState({cryptoTradingSignals: cryptoTradingSignal}), ); } {this.state.cryptoTradingSignals.length !== 0 && this.state.cryptoTradingSignals && this.state.cryptoTradingSignals !== undefined && this.state.cryptoTradingSignals !== null ? ( <View style={{ flex: 1, alignItems: 'center', paddingBottom: 30, }}> <Text style={styles.sectionHeader}> Market Signals </Text> <Box style={{margin: 5}} width="80%" bg="white" p="5" shadow={2} rounded="md" _text={{ fontSize: 'md', fontWeight: 'bold', color: 'black', }}> <View style={{flexDirection: 'column'}}> <Text style={styles.marketSentimentTitle}> In The Money Signal </Text> <Text> Category:{' '} {this.state.cryptoTradingSignals .inOutVar.category ? 'not available' : null} </Text> <Text> Sentiment:{' '} { this.state.cryptoTradingSignals .inOutVar.sentiment } </Text> </View> </Box>
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!