JamesBrill / react-speech-recognition

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

fix to work with nextjs #61

Closed Raggok closed 3 years ago

Raggok commented 3 years ago

It will let pass nextjs build and work fine on runtime

JamesBrill commented 3 years ago

Hi @Raggok thanks for the contribution. The navigator issue is not an issue specifically with supporting Next.js, but with server-side rendering (SSR). This library used to work with SSR (it has a SSR-friendly fallback when window is undefined), but presumably would have been broken when I introduced the Android logic that uses navigator.

This logic seems sensible - I will merge. Thanks for highlighting the SSR issue!