Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
onSelectedShowdateChangeHandler() {
this.setState(
{ selectedShowdate: event.target.value },
this.getShowtimeList
Hi guys, I'm having a "event" is deprecated error here, not so sure what I should replace it with. Thank you so much
Event handler callbacks will be given an event object as an argument when invoked. Just add that argument to your function:
onSelectedShowdateChangeHandler(event) {
// Function body
It's up to you, but some prefer to just name it e or similar to avoid clashing with the "global" event object.
onSelectedShowdateChangeHandler(myEvent) {
this.setState(
{ selectedShowdate: myEvent.target.value },
this.getShowtimeList
I'm surprised you're still using it, unless you're using legacy code. event was deprecated years ago.
–