@leanprover/infoview
    Preparing search index...

    Function useEvent

    • A specialization of React.useEffect which executes f with the event data whenever ev fires. If key is provided, f is only invoked on events fired with that key.

      Type Parameters

      • E
      • K

      Parameters

      • ev: EventEmitter<E, K>
      • f: (_: E) => void
      • Optionaldependencies: DependencyList
      • Optionalkey: K

      Returns void