UNPKG

react-avatar

Version:

Universal React avatar component makes it possible to generate avatars based on user information.

15 lines 447 B
export default class InternalState { constructor() { this.sourcePointer = 0; this.active = true; this.fetch = null; } isActive() { let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; // Internal state has been reset => we received new props if (state.internal !== this) return false; if (!this.fetch) return false; if (this.active !== true) return false; return true; } }