-
Notifications
You must be signed in to change notification settings - Fork 24
Description
This proposal is so great. It fills the black whole - a missing link between promise flows - and I believe it fills a really important missing piece in modern JS.
The described use cases are great - priority tasks, logging contexts etc. But I also believe this proposal could improve many user-land libraries and frameworks and make things possible that weren't before:
-
React will be able to support async components on the client (making it in-pair with their new server components) as React.Context could work thanks to this proposal. All the dancing around async fetching using useEffect() or suspense would suddenly be a piece of cake and drag us back to plain await calls within the components.
-
Dexie.js (my library) will be able to track liveQueries and transactions without having to do it using its own tricks.
...probably a lot more libraries and frameworks that are context aware - that could go all-in on async await without having to re-invent the wheel.
That said, I think the biggest win of this proposal is Promise and async/await. All whatwg related features (especially the discussion around EventTarget #19) could potentially generate some questions that could take time and effort from the core proposal. In the worst case, stall this proposal from advancement.
Could it be a thought to put whatwg-related changes as a non-goal for this proposal and limit it to Promise and async/await only as a first step?