JsFunctionComponent typedef

JsFunctionComponent = dynamic Function(JsMap props, [JsMap? legacyContext])

The function signature for ReactJS Function Components.

  • props will always be supplied as the first argument
  • legacyContext has been deprecated and should not be used but remains for backward compatibility and is necessary to match Dart's generated call signature based on the number of args React provides.

Implementation

typedef JsFunctionComponent = /*ReactNode*/ dynamic Function(JsMap props, [JsMap? legacyContext]);