You are viewing a single comment's thread from:
RE: ULOG #24: Completing Ulog Stories
Good to see you are still helping out with the task requests! There's not that much code, but let's have a look:
- Some inconsistencies in formatting, style, using
var
etc -- you should use a linter.
ulogStoriesArr.sort((a, b) => {
var keyA = new Date(a.created),
keyB = new Date(b.created);
if(keyA > keyB) return -1;
if(keyA < keyB) return 1;
return 0;
});
- Code above could be turned into a one liner.
I don't use React myself, so can't really give more feedback unfortunately.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
Thank you Amos for the feedback. I'll consider these on succeeding contributions.
I did try the one liner,
return b-a
but I wasn't comfortable / convinced of the result, so I took the longer route.Posted using Partiko Android
Thank you for your review, @amosbastian! Keep up the good work!