Daniel Tschinder
Daniel Tschinder
Thanks for reporting. You are right that this totally should work. We will have a look soon.
Is this a flow or typescript feature?
Yes right now we rely on the fact that a component returns jsx. Because we only want to generate documentation for react components and not for helpers , utils or...
There is now version v6.0.0-alpha.1 which is the first pre-release with typescript typings included.
Here (https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components) it is mentioned that `React.FC` is discouraged, although I didn't read all the conversations about it. So in the light of this I wonder if this should be...
I guess this could work, also this is not dependent on typescript, this could even be useful with `PropTypes`.
There is currently no way, but I have already thought about loosening the requirements. So basically if the format is correct (objectexpression in propTypes property, call expression with a known...
The bigger questions for this is not if we are going to support it, but how. Hooks are just generic functions, so it would be really hard to distinguish hooks...
react-docgen in 3.0.0 changed to use the new decorators proposal be default. Which in retrospect was a big mistake as it is already abandoned and a complete new specification exists.🙄...
Which version of react-docgen are you using?