registerFunctionComponent top-level property
Registers a function component on the client.
Example:
var myFunctionComponent = registerFunctionComponent((props) {
return ['I am a function component', ...props.children];
});
Example with display name:
var myFunctionComponent = registerFunctionComponent((props) {
return ['I am a function component', ...props.children];
}, displayName: 'myFunctionComponent');
or with an inferred name from the Dart function
myDartFunctionComponent(Map props) {
return ['I am a function component', ...props.children];
}
var myFunctionComponent = registerFunctionComponent(myDartFunctionComponent);
Implementation
FunctionComponentRegistrar registerFunctionComponent =
validateJsApiThenReturn(() => registration_utils.registerFunctionComponent);