alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Error: Invariant Violation: ReactSuperSelect.render() #41

Closed psibi closed 8 years ago

psibi commented 8 years ago

I'm trying to make a sample example work:

var ReactSuperSelect = require('react-super-select');

var SomeTag = React.createClass({

    render: function() {
        var testData = [
            {
                "id": "5507c0528152e61f3c348d56",
                "name": "elit laborum et",
                "size": "Large"
            },
            {
                "id": "5507c0526305bceb0c0e2c7a",
                "name": "dolor nulla velit",
                "size": "Medium"
            }
        ];

        return (
                <div>
                <ReactSuperSelect placeholder="Select Tags"
            dataSource={testData}/>
                </div>
        );
    }
}); 

And in the console, I'm getting this error:

Error: Invariant Violation: ReactSuperSelect.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.
alsoscotland commented 8 years ago

@psibi can you tell me anything more about your setup? React versions etc.

alsoscotland commented 8 years ago

@psibi version 0.2.2 seems to have gotten most people into a working state. Closing for now

psibi commented 8 years ago

@alsoscotland Sorry, didn't get time to try it. Thanks for resolving the issue.