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

163
Views
Flatlist recibió un mensaje de error que decía que no se devolvió nada del procesamiento

como puedo solucionar este problema, me sale un error que dice

Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

cuando quiero mostrar mi archivo JSON en mi pantalla de Lista (CurrenciesList.js) el código está aquí

 import React from 'react' import { FlatList, View } from 'react-native' import RowItem from '../../components/RowItem' import currencies from '../../data/currencies.json' export default () => { <View> <FlatList data={currencies} renderItem={({item}) => { return <RowItem title={item}/> }} /> </View> }

RowItem es el componente reutilizable y solo pasa un parámetro de texto.

 const RowItem = ({title, onPress}) => { return ( <TouchableOpacity onPress={onPress}> <Text style={styles.title}>{title}</Text> </TouchableOpacity> ) } export default RowItem

y mi archivo JSON (currencies.json) es así

 [ "AUD", "BGN", "BRL", "CAD", "CHF", "CNY", "CZK", "etc.." ]
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Tu función no devuelve nada.

cambio

 export default () => { <View> </View> }

a:

 export default () => { return <View> ... </View> }

o para

 // no curly braces export default () => <View> ... </View>
about 4 years ago · Juan Pablo Isaza Report

0

Puedes probar esto,

 import React from 'react' import { FlatList, View } from 'react-native' import RowItem from '../../components/RowItem' import currencies from '../../data/currencies.json' export default () => { return ( <View> <FlatList data={currencies} renderItem={({item}) => { return <RowItem title={item}/> }} /> </View> ); }
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!