You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our components are written in CJSX, which is compiled to CoffeeScript and then straight to JS. When running react-docgen on the resultant files, I receive the ERROR_MISSING_DEFINITION error. I realize now that this because somewhere during the conversion process, my JS ends up looking like this:
var Component, React;
React = require('react');
/**
* The is a component to test the document generation
*/
Component = React.createClass({
displayName: 'Component',
propTypes: {
...
Since Component = React.createClass({ isn't preceded by var, this documentation generator refuses to see the definition. This is really annoying.
The text was updated successfully, but these errors were encountered:
Mmh, I see. I guess the issue is with how we resolve the identifiers to values. I guess we should be able to detect that there is only a single assignment to the variable (in the top level scope) (React and Component) and use that value then.
Our components are written in CJSX, which is compiled to CoffeeScript and then straight to JS. When running react-docgen on the resultant files, I receive the
ERROR_MISSING_DEFINITION
error. I realize now that this because somewhere during the conversion process, my JS ends up looking like this:Since
Component = React.createClass({
isn't preceded byvar
, this documentation generator refuses to see the definition. This is really annoying.The text was updated successfully, but these errors were encountered: