js-util

Home > rc-js-util > IBroadcastEvent > addOneTimeListener

IBroadcastEvent.addOneTimeListener() method

Like addListener but unregisters after first event.

Signature:

addOneTimeListener(listener: TListener<TKey, TArgs>): () => void;

Parameters

Parameter Type Description
listener TListener<TKey, TArgs>  

Returns:

() => void