Skip to content

Commit ebfac66

Browse files
committed
Fix mismatch between props used in code snippet
1 parent 7408e52 commit ebfac66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/JSX.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,18 @@ class Component extends React.Component<PropsType, {}> {
378378
}
379379

380380
// OK
381-
<Component>
381+
<Component name="foo">
382382
<h1>Hello World</h1>
383383
</Component>
384384

385385
// Error: children is of type JSX.Element not array of JSX.Element
386-
<Component>
386+
<Component name="bar">
387387
<h1>Hello World</h1>
388388
<h2>Hello World</h2>
389389
</Component>
390390

391391
// Error: children is of type JSX.Element not array of JSX.Element or string.
392-
<Component>
392+
<Component name="baz">
393393
<h1>Hello</h1>
394394
World
395395
</Component>

0 commit comments

Comments
 (0)