You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a lot of our code, we render arrays of components. React requires components rendered in an array to have a key attribute. The key attribute should be unique to the component because React uses it to match states for the components. In many instances, we use an item index in the key to differentiate them. This is bad practice since the index is not unique to the component, and if component orders were to change (e.g. sorting a list of reviews) then their states/data would be mismatched. You can read more about keys on the react documentation. Additional documentation available in our wiki.
Here's a screenshot of a grep search for key={. Any of them that use an index in the key should be changed to something unique to the component e.g. a professor name or ucinetid for a list of professors.
The text was updated successfully, but these errors were encountered:
js0mmer
added
the
Story Point: 2
small UI change, maybe some CSS + JS. unit test would ideally be written, but not always.
label
May 27, 2023
js0mmer
added
Story Point: 3
backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the
and removed
Story Point: 2
small UI change, maybe some CSS + JS. unit test would ideally be written, but not always.
labels
Feb 15, 2024
In a lot of our code, we render arrays of components. React requires components rendered in an array to have a key attribute. The key attribute should be unique to the component because React uses it to match states for the components. In many instances, we use an item index in the key to differentiate them. This is bad practice since the index is not unique to the component, and if component orders were to change (e.g. sorting a list of reviews) then their states/data would be mismatched. You can read more about keys on the react documentation. Additional documentation available in our wiki.
Here's a screenshot of a grep search for
key={
. Any of them that use an index in the key should be changed to something unique to the component e.g. a professor name or ucinetid for a list of professors.The text was updated successfully, but these errors were encountered: