once(event, callback, context)
Listen to changes in Mimic data, the callback will only be called one time.
for a list of events please see Events
import Mimic from 'mimic';
// without context
Mimic.once('REQUEST_CAPTURED', () => console.log('a request has been captured'));
// outputs: a request has been captured
// with context
const context = { foo: 'bar' };
Mimic.once('REQUEST_CAPTURED', () => console.log(this.foo), context);
// outputs: bar