diff options
Diffstat (limited to 'integration/snippets/spread_with_key.tsx')
-rw-r--r-- | integration/snippets/spread_with_key.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/integration/snippets/spread_with_key.tsx b/integration/snippets/spread_with_key.tsx new file mode 100644 index 000000000..9c26ea5ba --- /dev/null +++ b/integration/snippets/spread_with_key.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +export function SpreadWithTheKey({ className }: Props) { + const rest = {}; + return ( + <div + className={className} + key="spread-with-the-key" + {...rest} + onClick={() => console.log("click")} + > + Rendered component containing warning + </div> + ); +} + +export function test() { + console.assert(React.isValidElement(<SpreadWithTheKey className="foo" />)); + return testDone(import.meta.url); +} |