Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSX element type  VideoRecorder  does not have any construct or call signatures. #194

Open
kzmKZuzmo opened this issue Dec 5, 2023 · 5 comments

Comments

@kzmKZuzmo
Copy link

kzmKZuzmo commented Dec 5, 2023

Hi how can I implement with typescript I always get error
JSX element type  VideoRecorder  does not have any construct or call signatures.

...
"react-video-recorder": "^3.19.4",
"styled-components": "^6.1.1",
"typescript": "^4.9.5",
...
"devDependencies": {
"@types/react-video-recorder": "^3.19.3"
}

`
import React, {useEffect, useRef} from 'react';

import VideoRecorder from 'react-video-recorder'

class App extends React.Component {
render() {
return ( <VideoRecorder
onRecordingComplete={(videoBlob: any) => {
console.log('videoBlob', videoBlob)
}}
/>)
}

}

export default App;`

@Laucsen
Copy link

Laucsen commented Dec 18, 2023

Same problem here.

Versions:
"react-video-recorder": "^3.19.4",
"@types/react-video-recorder": "^3.19.3",

@rorlich
Copy link

rorlich commented Jan 2, 2024

same

@abdul-muhamin-rehman
Copy link

I am having the same issue with version 3.19.3 & 3.19.4.

@fahidsarker
Copy link

Same issue 3.19.4

@onlyahost
Copy link

To fix this for now, add a file custom.d.ts and add the following content.

declare module "react-video-recorder" {
  const VideoRecorder: React.ComponentType<any>;
  export default VideoRecorder;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants