cn10xdev / react-express-starter

A basic Boilerplate for React (Front-end) and Server (Back-end) rendering
MIT License
0 stars 4 forks source link

Improper Use of Index as Key in React List Rendering #10

Closed cn10xdev closed 1 week ago

cn10xdev commented 1 week ago

The map() function in the Customers component uses the array index as the key instead of a unique customer ID. This could lead to potential issues with rendering efficiency and reordering. The goal is to switch to a unique identifier without giving away the answer.

rishavd3v commented 1 week ago

Hey, if this issue is not assigned to anyone, I'd like to work on it. Using array indices as keys can introduce potential issues with rendering efficiency and UI consistency especially when the list of customers is reordered or modified.

rishavd3v commented 1 week ago

@cn10xdev thanks for assigning the issue to me. Made a PR (#12) please have a look.

rishavd3v commented 1 week ago

Thanks for the opportunity to contribute! Can you please add "hacktoberfest" or hacktoberfest-accepted" label to the issue? "HacktoberFest24" is not a valid tag.

cn10xdev commented 1 week ago

sure

rishavd3v commented 1 week ago

Thanks, but it still doesn't seem to count it towards hacktoberfest contribution! I think it is important for the repo to have 'hacktoberfest' label to be eligible.