Command callbacks do not have access to the resetTranscript function as they have to be defined before resetTranscript is returned by useSpeechRecognition. This PR addresses this problem by passing resetTranscript to the command callbacks as the last argument. This is put inside an object to allow further properties to be passed in future. Intended to address https://github.com/JamesBrill/react-speech-recognition/issues/53
Command callbacks do not have access to the
resetTranscript
function as they have to be defined beforeresetTranscript
is returned byuseSpeechRecognition
. This PR addresses this problem by passingresetTranscript
to the command callbacks as the last argument. This is put inside an object to allow further properties to be passed in future. Intended to address https://github.com/JamesBrill/react-speech-recognition/issues/53