question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any non-typescript creatable examples?

See original GitHub issue

Trying to use react-select to create an input where people can add dynamic tags. Looked like the creatable examples are what I’m looking for but I couldn’t seem to get them working. Is their any examples of creatables not using typescript?

Every time I add a creatable I get this error

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
a-liaukouskicommented, Apr 7, 2020

I have the same issue on using simple Select component after installing latest version using npm i react-select. If i install react-select using yarn add - the same code works fine. But my project is using npm so yarn is not an option. Thanks Versions “react-select”: “^3.1.0”, “react”: “^16.8.3”

0reactions
ebonowcommented, Dec 7, 2020

Greetings @joshbedo

Which version are you trying to use? If you are accessing V3 then…

import Createable from "react-select/creatable";

Previous versions had a different entry-point syntax, but this is no longer valid: import Async from 'react-select/lib/Async

Here is a codesandbox example of a CreateableSelect to help you on your way.

Let me know if this fulfills your needs or if you have other questions. I will mark this as closed, but can reopen this if there are verified issues with getting your instance to work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creatable - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >
react-select and typescript: Type 'string' is not assignable to ...
For this, I created a functional component and added the default example from react-select docs: const options = [ {value: 'chocolate', label: ' ......
Read more >
React Select Example - Fully Customizable - YouTube
Here is a React select example with different use cases. We will build React select with a single value, React multiselect with an...
Read more >
@commercetools-uikit/async-creatable-select-input - npm
An input component getting a selection from an asynchronously loaded list from the user, and where options can be created by the user....
Read more >
Assertion Functions or Assertion Guards - TypeScript ...
In our type guard for string s, we return true if the given argument is a string and false if it's not. const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found