Closed DoloMike closed 5 years ago
This is in the readme and will throw an error: import React, { PropTypes, Component } from 'react'
import React, { PropTypes, Component } from 'react'
const propTypes = { // Props injected by SpeechRecognition transcript: PropTypes.string, resetTranscript: PropTypes.func, browserSupportsSpeechRecognition: PropTypes.bool };
the error: TypeError: Cannot read property 'string' of undefined
TypeError: Cannot read property 'string' of undefined
Note: React.PropTypes is deprecated as of React v15.5. Please use the prop-types library instead.
The readme should be updated to use: import PropTypes from 'prop-types'
import PropTypes from 'prop-types'
Also prop-types should now be a peer dependency if this is required.
You're absolutely right - thanks for pointing this out. I'll update this when I get a chance next week.
Resolved in https://github.com/FoundersFactory/react-speech-recognition/pull/15
This is in the readme and will throw an error:
import React, { PropTypes, Component } from 'react'
the error:
TypeError: Cannot read property 'string' of undefined
The readme should be updated to use:
import PropTypes from 'prop-types'
Also prop-types should now be a peer dependency if this is required.