rkit / react-select2-wrapper

Wrapper for Select2
MIT License
163 stars 97 forks source link

Invariant Violation: Select2.render(): A valid ReactComponent must be returned. #4

Closed decodeman closed 8 years ago

decodeman commented 8 years ago

I'm using React v0.13.3. I install react-select2-wrapper from npm. I follow the example exactly it seems, yet get this error. Any ideas?

Invariant Violation: Select2.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.

<Select2
            multiple={false}
            data={[{text: 'Bug', id: 0}, {text: 'Feature', id: 1}, {text: 'Documents', id: 2}, {text: 'Discussion', id: 'UUID'}]}
            options={{
              placeholder: 'search by tags'
            }}/>

My imports:

import React from 'react';
import Select2 from 'react-select2-wrapper';
rkit commented 8 years ago

The current version uses React 0.14, v0.0.5 support React 0.13

rkit commented 8 years ago

I closed. Let me know if you have any problems.