Reactjs – Count how many times a function is called with React Hook, not updating
I have the following react rendering <p>Send Counter: {counterHook}</p> <button onClick={() => startRecording()}>Start</button> once startRecording gets called, the callback function onTranscribe is called: const [counterHook, updateCounter] = useState(0) const onTranscribe = async (blob: Blob) => { console.log("onTranscribe") updateCounter(counterHook => counterHook…