B
B
bpGusar2018-10-12 14:02:52
JavaScript
bpGusar, 2018-10-12 14:02:52

If the function is in a separate file, it fires on onClick, how can I pass the event to it?

If the function is in a separate file, it fires on onClick, how can I pass the event to it?
5bc081e0af0bb498878781.png5bc081e6b8df0907748266.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-10-12
@rockon404

It is already passed as the first argument when called. Just use it in your handler:

handleCountyItemClick = e => {
  // do something with e
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question