mirror of
https://github.com/facebook/react.git
synced 2026-02-25 05:03:03 +00:00
33 lines
574 B
JavaScript
33 lines
574 B
JavaScript
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
export default function ObjectProps() {
|
|
return (
|
|
<ChildComponent
|
|
object={{
|
|
outer: {
|
|
inner: {
|
|
string: 'abc',
|
|
number: 123,
|
|
boolean: true,
|
|
},
|
|
},
|
|
}}
|
|
array={['first', 'second', 'third']}
|
|
objectInArray={[
|
|
{
|
|
string: 'abc',
|
|
number: 123,
|
|
boolean: true,
|
|
},
|
|
]}
|
|
arrayInObject={{ array: ['first', 'second', 'third'] }}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ChildComponent(props: any) {
|
|
return null;
|
|
}
|