Answers for "react native loop through object"

6

react js iterate object

<div className="iterate-object">
{
	<ul>
  		{Object.keys(OBJECTHERE).map(function(keyName, keyIndex) {
    		return (
      			<li key={keyName}>
					{keyName}
                    {console.log(OBJECTHERE[keyName])}
          		</li>
    		)
		})}
	</ul>
}
</div>
Posted by: Guest on May-02-2020
-1

react native loop in render

{
  countryCodes.map(
    ({name,code,emoji}): React.ReactElement<any> => {
    return (
    <Picker.Item label={emoji+' '+name} value={code} key={name} />
    );
},
  )
}

use this in jsx anywhere use want to use
Posted by: Guest on June-24-2021

Code answers related to "react native loop through object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language