const memoizeGetters = require('memoize-getters');
class Event {
get date() {
return new Date();
}
}
// lets create a new class that'll have all getters be memoized
const MemoizedEvent = memoizeGetters(class MemoizedEvent extends Event {});
let event = new MemoizedEvent();
// these two should be equal because the value is cached
event.date === event.date