class State { constructor(public lifeCycleNum: number) { } } export const state = reactive(new State(0)) export const setLifeCycleNum = (num: number) => { state.lifeCycleNum = num }