| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import * as React from 'react'; |
| 11 | import {Component} from 'react'; |
| 12 | |
| 13 | function noop() {} |
| 14 | |
| 15 | export default class SimpleValues extends Component { |
| 16 | anonymousFunction: () => void = () => {}; |
| 17 | |
| 18 | render(): React.Node { |
| 19 | return ( |
| 20 | <ChildComponent |
| 21 | string="abc" |
| 22 | emptyString="" |
| 23 | number={123} |
| 24 | undefined={undefined} |
| 25 | null={null} |
| 26 | nan={NaN} |
| 27 | infinity={Infinity} |
| 28 | minusInfinity={-Infinity} |
| 29 | true={true} |
| 30 | false={false} |
| 31 | function={noop} |
| 32 | anonymousFunction={this.anonymousFunction} |
| 33 | boundFunction={noop.bind(this)} |
| 34 | regex={/abc[123]+/i} |
| 35 | /> |
| 36 | ); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | function ChildComponent(props: any) { |
| 41 | return null; |
| 42 | } |