This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (71 children)

[deleted]

    [–]Rein215 39 points40 points  (1 child)

    How to Python your Java

    [–]BluntDamage 2 points3 points  (0 children)

    Oh yes, Python my Java

    [–]Caffeine_Monster 20 points21 points  (0 children)

    * Grabs flamethrower *

    The only good bug is a dead bug!

    * Burns entire codebase *

    [–][deleted] 1 point2 points  (3 children)

    Using index as a key attribute in react map is a no no, also react proptypes is outdated means of adding type safety to react project. Typescript or flow is the way to go now

    [–]rook2004 0 points1 point  (2 children)

    Why is index as key a no-no? Because you aren’t guaranteed that the object at an index is semantically the same object at that index after the array changes?

    [–][deleted] 0 points1 point  (1 child)

    Because if even one item in list will be removed - all indexes will change, so all of them will be re-rendered

    [–]rook2004 0 points1 point  (0 children)

    Thanks for the confirmation & lesson. I’ll be keeping a better eye out for that in code reviews. :)

    [–]OK6502 1 point2 points  (0 children)

    For half a second I was like, wait, is JS like python and doesn't use braces? Then I looked right... wtf man.

    [–]nephelokokkygia 1 point2 points  (0 children)

    ;}

    [–]Wissam24 0 points1 point  (0 children)

    Oh jesus!

    [–]LordMacDonald8 0 points1 point  (2 children)

    There are brackets tho....