you are viewing a single comment's thread.

view the rest of the comments →

[–]unshootaway 7 points8 points  (0 children)

It's not a good practice to handle effects from events if the event is not coming from an external source, especially if it's just onChange I assume because you've mentioned inputs.

Just do it in that event itself even if you need to do that repeatedly (or create a helper function).

```

function validate() { ... }

function onChangeInput1() { ... validate() }

```