javascript-tutorial / javascript-tutorial/en.javascript.info
Proposal: Add modern `Promise.allSettled` alternative to "Fetch users" task solution
还没有人认领这个 Issue。
- 主要语言
- HTML
- 星标
- 25.5k
- 派生
- 4k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Description
The current solution for the "Fetch users from GitHub" task demonstrates parallel execution by mixing .then() with async/await. While this serves its stated pedagogical purpose, modern JavaScript codebases typically utilize pure async/await combined with Promise.allSettled for concurrent, fault-tolerant network requests.
Proposal
I propose adding a brief "Alternative modern approach" section to the bottom of the solution.md file. This addition will demonstrate how to achieve the same concurrent execution and error handling using Promise.allSettled and asynchronous array mapping, without removing the original lesson.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
阅读 5-network/01-fetch/01-fetch-users/solution.md,以及其中链接的 task.md 和现有的 solution。在保留原课程的同时,添加一个简短的“现代替代方案”部分,使用 Promise.allSettled、async/await 和异步数组映射演示并发且容错的请求。示例清晰、与 task 一致,并记录在 solution 文件中,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- documentation
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 84/100