Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
test/forward_ref_test.dart
Outdated
| final ForwardRefTestComponent = forwardRef2((props, ref) { | ||
| return null; | ||
| }); |
There was a problem hiding this comment.
Another nice thing about switching from a dynamic return type to Object? is that for function components, you get an analysis warning if you forget to return something.
There was a problem hiding this comment.
This actually seems like a breaking change, so unfortunately I think we'll have to change the return type of JsFunctionComponent/JsForwardRefFunctionComponent and Component(2).render back to dynamic
a7a77f5 to
ead4b8e
Compare
greglittlefield-wf
left a comment
There was a problem hiding this comment.
A couple comments about breakages, otherwise LGTM!
test/forward_ref_test.dart
Outdated
| final ForwardRefTestComponent = forwardRef2((props, ref) { | ||
| return null; | ||
| }); |
There was a problem hiding this comment.
This actually seems like a breaking change, so unfortunately I think we'll have to change the return type of JsFunctionComponent/JsForwardRefFunctionComponent and Component(2).render back to dynamic
greglittlefield-wf
left a comment
There was a problem hiding this comment.
+1, QAing now...
greglittlefield-wf
left a comment
There was a problem hiding this comment.
- Changes look good
- Code analyzes and builds without error in over_react and other private consumers
+10
@Workiva/release-management-p
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
ReactNodetypeNow 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
ReactNodetypedef, which is an alias forObject?.