it isn't impossible, it's just clunky to write in JS because it has no `do` notation (`await` is limited to Promises, and `yield` would screw up static typing). it's also unnecessary runtime overhead to create intermediate closures that's why React just does useState(). "use" is the "do"

0

If you have a fediverse account, you can quote this note from your own instance. Search https://bsky.brid.gy/convert/ap/at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/app.bsky.feed.post/3m2xexv3u2k2v on your instance and quote it. (Note that quoting is not supported in Mastodon.)