Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React.createElement: type is invalid #23

Open
shiaky opened this issue Sep 29, 2020 · 0 comments
Open

React.createElement: type is invalid #23

shiaky opened this issue Sep 29, 2020 · 0 comments

Comments

@shiaky
Copy link

shiaky commented Sep 29, 2020

Hi,

I would like to use react-bootstrap-autosuggest. I imported it like this:

import Autosuggest from "react-bootstrap-autosuggest";
....
<Autosuggest
  datalist={[ 'Mr.', 'Mrs.', 'Ms.', 'Dr.', 'Rev.', 'Prof.', 'Robin' ]}
  placeholder="Name prefix"
/>
....

The input box will be rendered but when I click the dropdown arrow or type something I get the following error and no suggestions are rendered:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Suggestions`.
    in Suggestions (created by Autosuggest)
    in div (created by Autosuggest)
    in Autosuggest (at App.js:116)
    in div (at App.js:112)
    in div (created by Container)
    in Container (at App.js:87)
    in App (created by ConnectFunction)
    in ConnectFunction (at src/index.js:13)
    in Provider (at src/index.js:12)
    in StrictMode (at src/index.js:11)

I'm not sure whether I messed up some configuration or whether is is a real Issue. Here are the package versions used:

    "bootstrap": "^4.5.0",
    "react": "^16.13.1",
    "react-bootstrap": "^1.0.1",
    "react-bootstrap-autosuggest": "^0.5.0",
    "react-dom": "^16.13.1",
    "react-json-view": "^1.19.1",
    "react-scripts": "3.4.1",

Cheers,
Robin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant