File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1313* [ ` no-unknown-property ` ] : allow ` onLoad ` on ` body ` ([ #3923 ] [ ] @DerekStapleton )
1414* [ ` no-unknown-property ` ] : allow ` closedby ` on ` dialog ` ([ #3980 ] [ ] @ljharb )
1515
16+ ### Changed
17+ * [ Docs] [ ` no-array-index-key ` ] : add template literal examples ([ #3978 ] [ ] @akahoshi1421 )
18+
19+ [ #3978 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3978
1620[ #3980 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3980
1721[ #3930 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3930
1822[ #3923 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3923
Original file line number Diff line number Diff line change @@ -19,10 +19,18 @@ things.map((thing, index) => (
1919 < Hello key= {index} / >
2020));
2121
22+ things .map ((thing , index ) => (
23+ < Hello key= {` hello-${ index} ` } / >
24+ ));
25+
2226things .map ((thing , index ) => (
2327 React .cloneElement (thing, { key: index })
2428));
2529
30+ things .map ((thing , index ) => (
31+ React .cloneElement (thing, { key: ` hello-${ index} ` })
32+ ));
33+
2634things .forEach ((thing , index ) => {
2735 otherThings .push (< Hello key= {index} / > );
2836});
@@ -75,10 +83,18 @@ things.map((thing) => (
7583 < Hello key= {thing .id } / >
7684));
7785
86+ things .map ((thing ) => (
87+ < Hello key= {` hello-${ thing .id } ` } / >
88+ ));
89+
7890things .map ((thing ) => (
7991 React .cloneElement (thing, { key: thing .id })
8092));
8193
94+ things .map ((thing ) => (
95+ React .cloneElement (thing, { key: ` hello-${ thing .id } ` })
96+ ));
97+
8298things .forEach ((thing ) => {
8399 otherThings .push (< Hello key= {thing .id } / > );
84100});
You can’t perform that action at this time.
0 commit comments