ファイルを結合するために、Brunch と CoffeeScript を使用しています。vendor.js に Griddle を追加しました。グリドルにアクセスできるようになりました。これは機能です。だから私は呼び出すことができGriddle
、それは定義されています。
しかし、どうすれば ReactJS で使用できますか?
1つのコンポーネントの場合と同じように使用しようとしました:
Griddle = React.createFactory(Griddle)
...
render: ->
Griddle {results: fakeData}
これは以下を返します:
Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.
react-with-addons.js:21628 Warning: getInitialState was defined on Griddle, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?
react-with-addons.js:7400 Uncaught TypeError: Cannot read property '_currentElement' of null
基本的に、外部モジュールを使用して、JSX なしでテーブルをレンダリングしたいと考えています。