Tips from open-source: Set a maximum time limit on fetch using Promise.race()

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS: Build JSON-Driven Surveys and Forms with Full Data Control
Add the SurveyJS UI components to your JS app (React/Angular/Vue3). Securely collect and analyze data without sending it to 3rd-party servers. Fully customizable, works with any backend, and ideal for data-heavy apps. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. Next.js

    The React Framework

    // source: https://github.com/vercel/next.js/blob/canary/packages/next/src/lib/worker.ts#L121C15-L129C16 for (;;) { onActivity() const result = await Promise.race(\[ (this.\_worker as any)\[method\](...args), restartPromise, \]) if (result !== RESTARTED) return result if (onRestart) onRestart(method, args, ++attempts) }

  2. SurveyJS

    SurveyJS: Build JSON-Driven Surveys and Forms with Full Data Control. Add the SurveyJS UI components to your JS app (React/Angular/Vue3). Securely collect and analyze data without sending it to 3rd-party servers. Fully customizable, works with any backend, and ideal for data-heavy apps. Learn more.

    SurveyJS logo
  3. NextChat

    ✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

    // source: https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/3513c6801e0fd771ccb5784dcaefcac6d50245e4/scripts/fetch-prompts.mjs#L26 async function main() { Promise.all(\[fetchCN(), fetchEN()\]) .then((\[cn, en\]) => { fs.writeFile(FILE, JSON.stringify({ cn, en })); }) .catch((e) => { console.error("\[Fetch\] failed to fetch prompts"); fs.writeFile(FILE, JSON.stringify({ cn: \[\], en: \[\] })); }) .finally(() => { console.log("\[Fetch\] saved to " + FILE); }); } main();

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The Ultimate Tech Stack for Your 2025 Projects

    6 projects | dev.to | 6 Dec 2024
  • How I fixed this Next.js error: Refused to load the script because it violate Content Security Policy directive

    2 projects | dev.to | 16 May 2024
  • Mastering Data Fetching in React: A Comprehensive Guide to SWR

    2 projects | dev.to | 16 Oct 2023
  • Building a Blog Subscription and Pusher with AirCode and Resend

    7 projects | dev.to | 28 Aug 2023
  • How to build and deploy a modern-day Next.js application

    6 projects | dev.to | 19 Jul 2023

Did you know that JavaScript is
the 4th most popular programming language
based on number of references?