React Fragment - Each child in a list should have a unique "key" prop.



React Fragments Key Error

If you get the following error: Each child in a list should have a unique "key" prop when you're using React and React Fragments, add the key prop to the react fragment.

Example

<React.Fragment key={i}>
<!-- Some stuff here -->
</React.Fragment>

#ProblemSolved

Popular posts from this blog

I is for the Interface Segregation Principle

S is for the Single Responsibility Principle

L is for the Liskov Substitution Principle