Flash DX improvement idea: instead of ```js const doid = env.MY_DO.idFromString(user_id) const stu

Flash DX improvement idea:

instead of
const doid = env.MY_DO.idFromString(user_id)
const stub = env.MY_DO.get(doid)


let stubs be retrieved with just a string (to reduce boilerplate)
const stub = env.MY_DO.get(user_id) // ID
// or, for names
const stub = env.MY_DO.get(user_id, "name") // like KV's type


just one less line to work with DOs
Was this page helpful?