/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
packages/react-devtools-shell/src/app/InspectableElements/NestedProps.js
64 строки
1 KB
Andrew Clark
[Codemod] Update copyright header to Meta (#25315)
18 окт 2022, 18:19
Не верифицирован
18 окт 2022, 18:19
9cdf8a9
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import * as React from 'react'; const object = { string: 'abc', longString: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKJLMNOPQRSTUVWXYZ1234567890', emptyString: '', number: 123, boolean: true, undefined: undefined, null: null, }; export default function ObjectProps(): React.Node { return ( <ChildComponent object={{ outer: { inner: object, }, }} array={['first', 'second', 'third']} objectInArray={[object]} arrayInObject={{array: ['first', 'second', 'third']}} deepObject={{ // Known limitation: we won't go deeper than several levels. // In the future, we might offer a way to request deeper access on demand. a: { b: { c: { d: { e: { f: { g: { h: { i: { j: 10, }, }, }, }, }, }, }, }, }, }} emptyArray={[]} emptyObject={{}} /> ); } function ChildComponent(props: any) { return null; }