I have object as a data:
export const modules = {
digger: {
volume: 0,
maxCapacity: 100,
onTick: (state) => {
if (volume < maxCapacity) {
volume++;
}
}
}, ....
}
How i should use these variables?