At the end of the docs detaling React class/function components, there's an "alternative" way to declare defaultProps which we have been using so far. However, this doesn't quite seem to work with component syntax, which is kinda weird because one would assume that they largely follow the rules for functional components.
Flow version:
0.235.1
Expected behavior
defaultProps
works when declaring it as:Actual behavior
Cannot assign object literal to "Test.defaultProps" because property
defaultPropsis missing in "React.AbstractComponentStatics"
Try-Flow Link
At the end of the docs detaling React class/function components, there's an "alternative" way to declare
defaultProps
which we have been using so far. However, this doesn't quite seem to work with component syntax, which is kinda weird because one would assume that they largely follow the rules for functional components.Is this intentional?