You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
I'm getting this error : you're accessing the property target on a released/nullified synthetic event. when accessing target value in event.
what's the probleme?
The text was updated successfully, but these errors were encountered:
SaadMoutalib
changed the title
event.target is null
you're accessing the property target on a released/nullified synthetic event.
Jun 27, 2020
Greetings @SaadMoutalib ,
I actually experienced the same problem and fixed it the way you did. I just didn't understand the reason behind the problem.
I actually had read somewhere that this error occurs if we use React's synthetic event asynchronously like in a setState function. But, in my case, I was just assigning it to a variable like let val = event.target.value. (Which if I am not mistaken is not asynchronous). Maybe, this Av-Component (a Radio group in my case) is calling it in a way that makes it asynchronous?
I just wanted to share another observation,
So, I was logging the values and saw that the value was being logged once but immediately, an undefined was logged in and that error appeared. [Keep in mind that I am using AvRadioGroup.]
So, after using event.persist(), I am no longer getting the error but, I can clearly see that the value is being logged twice for the radio option I am clicking.
Referencing to this #37 (comment)
I think, the second time the event handler was being called with undefined and hence, that led to the said error that is, I was trying to access target property of a (undefined) nullified object.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm getting this error : you're accessing the property
target
on a released/nullified synthetic event. when accessing target value in event.what's the probleme?
The text was updated successfully, but these errors were encountered: