I import component as:
import {Slide as ReSlide} from 'react-awesome-reveal';
the code as :
<ReSlide direction="up" delay={-100}>
</ReSlide>
and on js working fine but i use it on tsx they give me error :
"JSX element type ‘ReSlide’ does not have any construct or call signatures."
how to solve it i have to make build of project!
2
Answers
I sold the problem with reinstall the package agine and it work fine i think the diffent was on the package
Try this ccreate a file named react-awesome-reveal.d.ts (you can name it differently if you prefer) at the same level as your other TypeScript files.
Inside this file, define the type for the Slide component from the react-awesome-reveal module:
This declaration file tells TypeScript how to interpret the Slide component from the react-awesome-reveal module and what props it accepts.
Now, in your TypeScript file (.tsx), you can import and use the ReSlide component without any errors: