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