scup / atellier

The smartest way to share interactive components with your team.

Home Page:http://scup.github.io/atellier/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Super expression must either be null or a function"

joerodrig opened this issue · 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 :)