I'm using Brunch and CoffeeScript to glue my files together. I added Griddle to vendor.js. Griddle is now accessible and it's a function. So I can call Griddle
and it's defined.
But how can I use it with ReactJS ?
I tried to use it like I would do for my one components:
Griddle = React.createFactory(Griddle)
...
render: ->
Griddle {results: fakeData}
This will return:
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
Basically, I want to use an external module to render tables without JSX.