Skip to content

Instantly share code, notes, and snippets.

@kristianpedersen
Last active November 11, 2020 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristianpedersen/3e8ed41e827687ba28659df866033256 to your computer and use it in GitHub Desktop.
Save kristianpedersen/3e8ed41e827687ba28659df866033256 to your computer and use it in GitHub Desktop.
If prop name and value are the same
// Boring :c
{songs.map(song => <LibrarySong setCurrentSong={setCurrentSong} song={song} />)}
// Fun and cool! :D
{songs.map(song => <LibrarySong {...{ setCurrentSong, song }} />)}
@julianojcs
Copy link

Nice ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment