Closed
Description
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.