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