Closed ChiralMichael closed 5 years ago
The latest change blew up my code when I tried to access the event, since it had been recycled. React outputs a helpful warning to the debug console when accessing properties on a recycled synthetic event, which illustrates the problem exactly.
Hi, can you reproduce your issue at https://codesandbox.io/s/new ?
I have a repro at https://codesandbox.io/embed/yvj1mj79l1 . Note the message in the console when you hit "submit". The upshot is that all properties on the event are nullified and hence unusable since the event is being bubbled from within a promise callback, after it has been recycled.
"This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property nativeEvent
on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information."
How is this looking? Do you need anything else from me?
@ChiralMichael sorry, I just don't have time to process this right now
@NewOldMax Thanks for getting back to me. I'll have to maintain a fork or else find another solution. Plan to fork/publish my own package for the time being. Feel free to close this request or leave open as you wish.
scratch that, I just locked to 2.0.3 for react-material-ui-form-validator. That will work for a while at any rate
@ChiralMichael please check the 2.0.8 version
Thanks so much, this is a huge help!
Persist the synthetic event so that it is accessible when the onClick callback is bubbled. See https://reactjs.org/docs/events.html#event-pooling