That's a great resource, thanks. So based on that, I think I should call `init(uid)` the first time

That's a great resource, thanks.
So based on that, I think I should call init(uid) the first time the user object is created, save the user's id to storage, and this way it will be available in storage whenever I'm calling that DO again, right? Just need to set it in the
constructor
like this:
ctx.blockConcurrencyWhile(async () => {
  this.uid = await ctx.storage.get('uid')
})
Was this page helpful?