Skip to content

[Flow.js] Typed children #24887

Closed
Closed
@retyui

Description

@retyui

How about add custom children type children: React$NativeNode for many react native component:

declare type React$NativeNode =
  | null
  | React$Element<any>
  | Iterable<?React$Node>;

It was really useful for the next case:

<View>'test'</View>; // error
<View>{0 && <View id={0}>}</View> // error 

Metadata

Metadata

Assignees

No one assigned

    Labels

    FlowRan CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.Type: QuestionIssues that are actually questions and not bug reports.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions