I have momentjs object in state
state = { startDate: getNow() //this funtion return a momemtJS object } in one function, I need to get the date one year before startDate
const dateBeforeOneYear = this.state.startDate.subtract(1, 'years'); But if I do like this, I modify the state by mistake
So I try to copy the state
const copyStartDate = {...this.state.startDate} const copyStartDate = this.state.startDate.subtract(1, 'years'); But now I get the error, substract is not a function, I guess because copyStartDate is no more MomemntJs