-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onStop callback not refreshed on componentUpdate #108
Comments
Ran into the same issue. Spent an hour debugging why the |
crutch
|
Facing the same issue. Spent hours on it. I don't like the solution using global variable. |
I'm new to React learning useEffect and hook stuff, this was very confusing guys :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function that I pass to on onStop changes because of changes in its internal dependency, but onStop always calls the first reference passed into .
I looked into the code and it seems to agree with my inference.
MicrophoneRecorder instance is created on componentDidMount of ReactMic Component and not on subsequent rerenders, so its not getting new onSave functions.
Surprisingly, the componentDidUpdate invokes
microphoneRecorder.stopRecording(onStop)
, but the stopRecording function in MicrophoneRecorder does not even accept a param.Seems like onStop was supposed to changed, but got missed somewhere in the implementation
The text was updated successfully, but these errors were encountered: