Forwarded from 10th WSS ☃️
Please open Telegram to view this post
VIEW IN TELEGRAM
Web_programming
دوستان این کانال هم میتونن با کد تخفیف زیر ، با بیست و پنج درصد تخفیف در رویداد ثبت نام کنند .
sharif_web
The DataLoader pattern is a common design pattern used primarily in backend development to optimize data fetching, especially in the context of GraphQL APIs. It helps reduce the number of database or API calls by batching and caching requests efficiently.
const promise1 = new Promise((resolve, reject) => {
setTimeout(resolve, 500, "one");
});
const promise2 = new Promise((resolve, reject) => {
setTimeout(resolve, 100, "two");
});
Promise.race([promise1, promise2]).then((value) => {
console.log(value);
// Both resolve, but promise2 is faster
});
// Expected output: "two"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race
MDN Web Docs
Promise.race() - JavaScript | MDN
The Promise.race() static method takes an iterable of promises as input and returns a single Promise. This returned promise settles with the eventual state of the first promise that settles.
When you apply:
It tells the browser to render the scrollbars in a narrower/thinner style than the default. This improves aesthetics in layouts with tight or minimal designs.
scrollbar-width: thin;
It tells the browser to render the scrollbars in a narrower/thinner style than the default. This improves aesthetics in layouts with tight or minimal designs.