I found a react-debounce-input library and I use it in my app without issues.
But since I moved to TypeScript, I'm getting an error when trying to use this library. Here's the minimal reproducible example:
import { FunctionComponent } from 'react';
import { DebounceInput } from 'react-debounce-input';
type Props = {};
export const Foo: FunctionComponent<Props> = () => {
return (
<form>
<DebounceInput />
</form>
);
};
The error I'm getting is:
TS2786: 'DebounceInput' cannot be used as a JSX component.
Its instance type 'DebounceInput<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>' is not a valid JSX element.
Type 'DebounceInput<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.
Am I missing something? According to the docs, it should work. I am using the newest version.