@@ -30,7 +30,7 @@ export 'package:react/src/react_client/synthetic_data_transfer.dart' show Synthe
3030/// See <https://reactjs.org/docs/components-and-props.html#function-and-class-components>.
3131///
3232/// [props] is typed as [JsBackedMap] so that dart2js can optimize props accesses.
33- typedef DartFunctionComponent = ReactNode Function (JsBackedMap props);
33+ typedef DartFunctionComponent = /* ReactNode*/ dynamic Function (JsBackedMap props);
3434
3535/// The callback to a React forwardRef component. See [forwardRef2] for more details.
3636///
@@ -39,7 +39,7 @@ typedef DartFunctionComponent = ReactNode Function(JsBackedMap props);
3939/// In the current JS implementation, the ref argument to [React.forwardRef] is usually a JsRef object no matter the input ref type,
4040/// but according to React the ref argument can be any ref type: https://github.com/facebook/flow/blob/master@%7B2020-09-08%7D/lib/react.js#L305
4141/// and not just a ref object, so we type [ref] as dynamic here.
42- typedef DartForwardRefFunctionComponent = ReactNode Function (JsBackedMap props, dynamic ref);
42+ typedef DartForwardRefFunctionComponent = /* ReactNode*/ dynamic Function (JsBackedMap props, dynamic ref);
4343
4444typedef ComponentFactory <T extends Component > = T Function ();
4545
@@ -545,7 +545,7 @@ abstract class Component {
545545 /// When called, it should examine [props] and [state] and return a [ReactNode] .
546546 ///
547547 /// See: <https://legacy.reactjs.org/docs/react-component.html#render>
548- ReactNode render ();
548+ /* ReactNode*/ dynamic render ();
549549}
550550
551551/// Top-level ReactJS [Component class] (https://reactjs.org/docs/react-component.html)
@@ -943,7 +943,7 @@ abstract class Component2 implements Component {
943943 ///
944944 /// See: <https://legacy.reactjs.org/docs/react-component.html#render>
945945 @override
946- ReactNode render ();
946+ /* ReactNode*/ dynamic render ();
947947
948948 // ******************************************************************************************************************
949949 //
0 commit comments