plus1tv / react-anime

✨ (ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React!
https://codepen.io/collection/nrkjgo/
MIT License
1.55k stars 81 forks source link

don’t recommend using indexes for keys if the order of items may change. #54

Closed cbbfcd closed 4 years ago

cbbfcd commented 5 years ago

in-depth explanation on the negative impacts of using an index as a key

codecov-io commented 5 years ago

Codecov Report

Merging #54 into master will increase coverage by 1.5%. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #54     +/-   ##
======================================
+ Coverage    62.5%   64%   +1.5%     
======================================
  Files           1     1             
  Lines          24    25      +1     
  Branches        7     7             
======================================
+ Hits           15    16      +1     
  Misses          5     5             
  Partials        4     4
Impacted Files Coverage Δ
src/react-anime.js 64% <100%> (+1.5%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4c23d7...d37a24b. Read the comment docs.

drewhoener commented 5 years ago

Curious about your new keys, did you mean to make it animei for each key? Or did I misread the template string?

cbbfcd commented 5 years ago

It’s my stupid mistake, so code-review is very important, i fixed it. 😄

alaingalvan commented 4 years ago

Sorry for the late reply!

Good idea, I went ahead and added this in 9487f04f316abd1ef4b8cf3ad99a8ee4fb99202c, thanks for pointing this out!