Workiva / react-dart

Dart Bindings for React JS
BSD 2-Clause "Simplified" License
413 stars 67 forks source link

FED-2298 Add ReactNode typedef #384

Closed aaronlademann-wf closed 8 months ago

aaronlademann-wf commented 8 months ago

Motivation

In React, a "React node" is a value that can be returned from a component's render or used as children, and contains more values than just ReactElement.

TypeScript captures this type as a ReactNode type

Now that Dart has type aliases (in SDK 2.13 and up), can name this type so that consumers can be more expressive in how they type their code (and also to help them avoid using ReactElement, which in some cases is overly restrictive).

Changes

aviary-wf commented 8 months ago

Security Insights

No security relevant content was detected by automated scans.

Action Items