Skip to content

Instantly share code, notes, and snippets.

@lomse
Created October 20, 2018 18:15
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 lomse/34cf6253ba5da33545a556fbe2d953df to your computer and use it in GitHub Desktop.
Save lomse/34cf6253ba5da33545a556fbe2d953df to your computer and use it in GitHub Desktop.
/**
* addTodo
*
* @param {Array} list
* @param {Object} item
*/
export const addTodo = (list, item) => [item, ...list]
/**
* generateId
*
*/
export const generateId = () => Math.floor(Math.random() * 100000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment