Skip to content

Instantly share code, notes, and snippets.

@MeetMartin
Created July 25, 2021 06:28
Show Gist options
  • Select an option

  • Save MeetMartin/b7cace64e5fb18054c69cfda0be79638 to your computer and use it in GitHub Desktop.

Select an option

Save MeetMartin/b7cace64e5fb18054c69cfda0be79638 to your computer and use it in GitHub Desktop.
return ({
...state, // add everything from the previous state
quote: action.payload.quote, // change quote based on payload
author: action.payload.author // change author based on payload
}); // return new state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment