JamesBrill / react-speech-recognition

💬Speech recognition for your React app
https://webspeechrecognition.com/
MIT License
637 stars 116 forks source link

Unhandled Runtime Error : (0 , _react.useState) is not a function #175

Open Naitik4516 opened 1 year ago

Naitik4516 commented 1 year ago

I am getting an unhandled runtime error in Nextjs 13.4 .

  8 |   resetTranscript,
   9 |   browserSupportsSpeechRecognition
> 10 | } = useSpeechRecognition();
     |                        ^
  11 | 
  12 | if (!browserSupportsSpeechRecognition) {
  13 |   return <span>Browser doesn't support speech recognition.</span>;
sonicvision commented 1 year ago

Yup.. same here. I get the same error in nextJs

Tucker-Judge commented 1 year ago

Next doesn't like the library or accessing the window object for ssr. I rendered my component dynamically with ssr off and it worked fine. Hope that helps.