Skip to content

Conversation

@dys2
Copy link

@dys2 dys2 commented Feb 7, 2018

Overview:

  • Switch to es6 functional syntax and use one liners where appropriate
  • Instead of searching for exact match search using includes. Will allow more interactive experience because it will slowly eliminate ones that don't match by each key stroke. Also remove case sensitivity for better matching.
  • Remove need for nesting when fetching data by using async await syntax
  • For shuffleList function, slice method should take in no argument. Otherwise it is slicing off the first in the list. Incorporate new javascript syntax for swapping. Improve formatting of the function in general.
  • Fix sortByLastName. As the function was written its reversing a sort on the firstName. That is not what the functions intention is. Simple fix by sorting the object by lastName property
  • For sortObjListByProp, remove argument for slice(to not slice off anyone in the list.) Also, if (a[prop] > b[prop]) return 1; is extraneous. Use ternary operator for clean code. Reformat to chain methods
  • Create function shouldReverse to check whether function has been sorted a->z yet. If it has reverse the sorting. Make it a higher order component that receives the sorting function and visiblePersonList as arguments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant