Commit 3324d77
react.createelement treats a literal array passed as the third argument
as a list of children, requiring a key on each item. when c.component
is a tooltip or any element that renders its children, this surfaces
as a "each child in a list should have a unique key prop" warning,
and components that don't accept children (e.g. muichip) issue a
"prop children is not supported" prop-type warning.
pass the single child value directly instead of wrapping it in a
one-element array literal. behavior is unchanged for viewbuilders
that return a single child (the common case); viewbuilders that
already return an array continue to work as react still treats
arrays as lists either way.
Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 42b73de commit 3324d77
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments