Closed rkmax closed 6 years ago
@rkmax what about a getter?
const Sample = t.struct({
type: t.String,
createdAt: t.Date
}, {
defaultProps: {
type: 'SAMPLE',
get createdAt() {
return new Date();
}
}
});
@gcanti thank you that works, I feel dumb :man_facepalming: overthinking it
I'm using 3.2.24
I found this pretty useful for things like this