1000010054

  • Kaboom@reddthat.com
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    4 days ago

    Yeah, that’s why key props are important. And sanity checks too. But too many programmers these days just turn off eslint rules without understanding why they exist

    • moseschrute@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      I’m not a recycling list expert, but I think the more keys you use the less react is able to reuse components in the list. So this is one area where keys are actually worse. You may be able to use them only on the image part of the post, but packages like expo-image have a recyclingKey prop you are supposed to use instead. But I found expo image to not work very well so 🤷

      But I think think the app we were referring to isn’t react native? Idk how native recycling lists work tbh so maybe you’re right about the key thing.