Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to map objects in react native

const api = { 'foo': 'bar', 'foz': 'baz'};
...
render() {
  return (
    Object.entries(api).map(([key, value]) => {
      return <View key={key}>{value}</View>
    });
  )
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #map #objects #react #native
ADD COMMENT
Topic
Name
3+2 =