Skip to content

Commit

Permalink
test: avoid missing key warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
asafkorem committed Jan 19, 2025
1 parent caaf943 commit 569b65a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detox/test/src/Screens/VirtualizedListStressScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

function Block() {
const subBlocks = _.times(30, (i) => (
<SubBlock>{i + 1}</SubBlock>
<SubBlock key={i}>{i + 1}</SubBlock>
));

return (
Expand Down Expand Up @@ -49,7 +49,7 @@ export default class VirtualizedListStressScreen extends Component {
return <View testID={'stub'} />;
}

const blocks = _.times(30, () => (<Block />));
const blocks = _.times(30, (i) => (<Block key={`block_${i}`} />));

return (
<ScrollView testID={'stressContainer'}
Expand Down

0 comments on commit 569b65a

Please sign in to comment.