aboutsummaryrefslogtreecommitdiff
path: root/test/snippets/spread_with_key.tsx
blob: 2dc0c707262eb5a5626f65bb0f818fa893e47932 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// @ts-nocheck
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);
}