scup/atellier

"Super expression must either be null or a function"

joerodrig opened this issue · 2 comments

Trying to test out this lib but can't seem to render the ReactAtellier component. My code and the error are below:

import ReactAtellier from 'react-atellier';
import TextareaAutosize from 'react-autosize-textarea';


// Surveys Index Page : Exported Component
export default class UtilitiesShowPage extends React.Component {
  render() {
    const COMPONENT_LIST = [{
      componentName: TextareaAutosize.displayName,
      component: TextareaAutosize,
    }];
    return ( <ReactAtellier components={COMPONENT_LIST}  /> );
  }
}

COMPONENT_LIST breaks down to:

COMPONENT_LIST = [{
  component: component(props, context, updater){...},
  componentName: "TextareaAutosize",
}]

screen shot 2016-03-15 at 4 43 12 pm

Hi, @joerodrig3... Do you have tried this?

var ReactAtellier = require('react-atellier')( React );

That fixed it, thank you :)