however, since you know Haskell, i do find it pedantic from your side that you're attaching to the "useState makes it impure" position when clearly useState() API could have been made monadic in the way i wrote above without any changes to the actual thing it's expressing. so it doesn't matter

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/3m2xf6gw2kc2v on your instance and quote it. (Note that quoting is not supported in Mastodon.)