Closed
Description
While using react-styleguidist
, I noticed that I was getting this warning:
Warning: Cannot parse src/components/Button/Button.js: RangeError: Maximum call stack size exceeded
It usually means that react-docgen does not understand your source code, try to file an issue here:
https://github.com/reactjs/react-docgen/issues
While trying to debug this problem. I was having issues determining where the issue came from. I am using Flow to type my components out and Flow wasn't reporting an error. However, I learned that the issue was coming from the fact that I had a type that defined a method that had a parameter that was the parent typing. While this works fine in Flow, it appears to cause issues when running through react-docgen
.
Here is a slimmed down representation of the problem: Try Flow
Note: You may need to swap the engine to v0.64.0
or master
as v0.65.0
is currently broken