APPEAL/29184 - Add key to AmaIssueList
#19280
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves https://jira.devops.va.gov/browse/APPEALS-29184
Description
This is a tech-debt task and should not change any functionality. https://jira.devops.va.gov/browse/APPEALS-29184
AmaIssueList
was missing a key prop which was throwing a React errorWarning: Each child in a list should have a unique "key" prop.
In an effort to reduce errors and increase performance we have added in these component keys.
Further reading on why React keys are important:
https://dev.to/francodalessio/understanding-the-importance-of-the-key-prop-in-react-3ag7
Acceptance Criteria
Testing Plan - At
queue/appeals/{appeal-id}
QA/Dev notes:
This error will show up in the browser Dev Tools (Message me if you need help with this)
The key prop itself will not show up on the element tree in the dev tools but that is okay as according to the React docs "Keys serve as a hint to React but they don’t get passed to your components."
I did not realize this prior to this task so I was looking for the key where it wouldn't be. So all we need for this task is just see if the error/warning went away.
Before
After