Durable object resets value on each request to Worker

According to the docs I've created an durable object:
[[durable_objects.bindings]]
name = "COUNTERS"
class_name = "UserIdCounter"

[[migrations]]
tag = "v1"
new_classes = ["UserIdCounter"]


With proper class in my Worker:
export class UserIdCounter extends DurableObject {
    async increment(amount = 1) {
        let value = (await this.ctx.storage.get("value")) || 0;
        value += amount;
        await this.ctx.storage.put("value", value);
        return value;
    }
}

export default {
    fetch: router.handle // my worker logic
}


When I'm trying to increment value, I'm always getting 1 for some reason:
const counterStub = env.COUNTERS.get(env.COUNTERS.idFromName('website'));
await counterStub.increment();


Using latest version of. Wrangler with command: wrangler dev --remote --local-protocol https
image.png
Was this page helpful?