Web_programming
1.14K subscribers
354 photos
14 videos
125 files
1.22K links
Sharif web programming
If you have any questions, please feel free to ask(@yumcoder)
Download Telegram
๐Ÿ‘18
๐Ÿ‘6
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.
๐Ÿ‘6
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
๐Ÿ‘4
๐Ÿ‘Ž5๐Ÿ‘4๐Ÿ˜ข2
vsCode and Gemini code Assistant
๐Ÿ˜3๐Ÿ‘1
When you apply:


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.