Created
October 6, 2019 04:27
-
-
Save simbathesailor/de9acdb9d3615b126dee463d00b4e7ba to your computer and use it in GitHub Desktop.
Props and State(returnedMutipleElements)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**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