Skip to content

Instantly share code, notes, and snippets.

@simbathesailor
Created October 6, 2019 04:27
Show Gist options
  • Select an option

  • Save simbathesailor/de9acdb9d3615b126dee463d00b4e7ba to your computer and use it in GitHub Desktop.

Select an option

Save simbathesailor/de9acdb9d3615b126dee463d00b4e7ba to your computer and use it in GitHub Desktop.
Props and State(returnedMutipleElements)
/**JSX need to be wrapped inside some containing element
in Reactjs **/
jobs.map(() => {
return (
<div>
<h3>{title}</h3>
<p>{description}</p>
</div>
)
})
/** But if we not need the unnecessary wrapping elements,
we can do something like this **/
jobs.map(() => {
return (
<>
<h3>{title}</h3>
<p>{description}</p>
</>
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment