-
Notifications
You must be signed in to change notification settings - Fork 156
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
OTSession component doesn't update eventHandlers prop natively #536
Comments
Hi @impe93 , I believe I didn't fully understand this issue. Where are you updating the |
Hi @enricop89 ! EDIT: I don't work anymore with opentok so I can't confirm that is still a problem in some newer versions! |
Thanks, I still don't understand the use case and why you want to update the reference to functions (
|
Well, The problem here is that if I want (and before I wanted to do that) to update the |
@impe93 thanks for the explanation, I will tag this issue as "feature request" 😀 . Thanks again! |
Bug Report
Current behavior
In the component
OTSession
the propeventHandlers
is updated only during the component init as proved here and not when prop update. This can lead to some problems.In my case, I do some specific logic based on the subscriber
streamId
that I save in the component state after thestreamCreated
event has triggered. The problem is that when I update thestreamId
the callback passed to the event object fieldstreamPropertyChanged
does not update nativelySteps to reproduce
OTSession
eventHandlers
prop filedsOTSession
of those functions never changesExample Project
This should be a working example, the
streamPropertyChanged
insessionEventHandlers
passed to theOTSession
component never change his function reference because under the hood in OTSession the prop is never updatedWhat is the current bug behavior?
OTSession
component is not update theeventHandlers
prop natively but only on component initWhat is the expected correct behavior?
OTSession
component update theeventHandlers
prop natively every time the prop reference changeThe text was updated successfully, but these errors were encountered: