JamesBrill / react-speech-recognition

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

Class Properties not enabled #28

Closed perezcato closed 4 years ago

perezcato commented 4 years ago

Support for class properties is disabled in the library

JamesBrill commented 4 years ago

Hi @perezcato How are you consuming React Speech Recognition? The library does use class properties, but the published package is compiled to ES5. Are you somehow consuming the raw source file?

You would see a Babel error like Support for the experimental syntax 'classProperties' isn't currently enabled if you were trying to compile a file with class properties without enabling the correct Babel plugin. But given the package is already compiled for you, this shouldn't be an issue for you as a consumer.