Check out example codes for "type '_Type' is not a subtype of type 'Widget'". It will help you in understanding the concepts better.

Code Example 1

wrong:
return Foo;
right:
return Foo();

Learn ReactJs, React Native from akashmittal.com