Issue
module import is not working for me. I'm tried different solutions provided from stack overflow and other. These are steps I'm follow the react-select
npm install --save @types/react-select
import the module like this
import Select from "react-select"
but I got the error
Module not found: Error: Can't resolve 'react-select'
import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>{
render(){
return(
<Select id="color" options={options} />
);
}
}
But I can't find the way to fixed this.
Solution
I found the issue having here. Issue is both @types/react-select
and react-select
added to the package.json
Answered By - Namindu Sanchila
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.