scup / atellier

The smartest way to share interactive components with your team.
http://scup.github.io/atellier/
MIT License
995 stars 33 forks source link

"Super expression must either be null or a function" #28

Closed joerodrig closed 8 years ago

joerodrig commented 8 years ago

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
agutoli commented 8 years ago

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

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

joerodrig commented 8 years ago

That fixed it, thank you :)