React-quill: JSX element type 'ReactQuill' does not have any construct or call signatures.

Created on 27 Feb 2018  路  11Comments  路  Source: zenoamaro/react-quill

I'm working in Typescript. I have implemented code as per ReadMe instructions but I get an odd Typescript error: "JSX element type 'ReactQuill' does not have any construct or call signatures." on the JSX component (see image).

The editor does render ok, so I'm not sure what the error message is all about.

quill

help wanted typescript

Most helpful comment

not sure but i managed to make it work by using this import:

import ReactQuill, {Quill} from 'react-quill';

i am using react typescript.

All 11 comments

Update
this syntax works: const ReactQuill = require('react-quill');
this fails: import ReactQuill from 'react-quill';
this generates error but renders: import * as ReactQuill from "react-quill";
Note: I am compiling to ES6.

I think this is fixed as of #349

not work.
"react-quill": "^1.3.1",

image

Any update? I'm still getting this error!

i also get this error.

not sure but i managed to make it work by using this import:

import ReactQuill, {Quill} from 'react-quill';

i am using react typescript.

I think the import * as syntax is the problem, not sure what if it's a typescript version difference or something with the Quill or ReactQuill definitions themselves.

@paigeflourin solution works!

same issue here :(

#349 is working for me.

// type.d.s
export class ReactQuill extends React.Component {
focus(): void;
blur(): void;
getEditor(): Quill.Quill;
}
export { Quill } from "quill";
export = ReactQuill;

// code
import * as ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css'

All you need to do is add declare module 'react-quill'; to your ./index.d.ts file for example:

Screen Shot 2020-11-20 at 5 22 49 PM

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fensterbank picture Fensterbank  路  3Comments

pooriamo picture pooriamo  路  3Comments

levous picture levous  路  3Comments

Nazanin1369 picture Nazanin1369  路  4Comments

alexkrolick picture alexkrolick  路  4Comments