Skip to content

Commit cff595e

Browse files
committed
Add examples of find() to no-array-index-key docs
I missed examples of this in my first pass at this documentation.
1 parent 56a4b57 commit cff595e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/rules/no-array-index-key.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ things.every((thing, index) => {
3535
otherThings.push(<Hello key={index} />);
3636
});
3737

38+
things.find((thing, index) => {
39+
otherThings.push(<Hello key={index} />);
40+
});
41+
3842
things.findIndex((thing, index) => {
3943
otherThings.push(<Hello key={index} />);
4044
});
@@ -75,6 +79,10 @@ things.every((thing) => {
7579
otherThings.push(<Hello key={thing.id} />);
7680
});
7781

82+
things.find((thing) => {
83+
otherThings.push(<Hello key={thing.id} />);
84+
});
85+
7886
things.findIndex((thing) => {
7987
otherThings.push(<Hello key={thing.id} />);
8088
});

0 commit comments

Comments
 (0)