🏄 CSS Grid Areas
CSS Grid support has been widely available since March 2017 in all major browsers. Yet, here we are in 2024, and I still see few people using the grid template areas feature.
It’s no surprise that many avoid template areas as making sense of the grid is challenging enough. In this interactive article, I aim to shed light on this feature and, hopefully, convince you to use it more often. Once you see the simplicity and power of template areas, you may reach for them much more frequently.
CSS Grid support has been widely available since March 2017 in all major browsers. Yet, here we are in 2024, and I still see few people using the grid template areas feature.
It’s no surprise that many avoid template areas as making sense of the grid is challenging enough. In this interactive article, I aim to shed light on this feature and, hopefully, convince you to use it more often. Once you see the simplicity and power of template areas, you may reach for them much more frequently.
👍10❤3
react-19-cheat-sheet.pdf
1.4 MB
📝 React 19 Cheat Sheet
This is part cheat sheet, part quick reminder of some of the new features in React 19 with simple code examples.
This is part cheat sheet, part quick reminder of some of the new features in React 19 with simple code examples.
❤8🔥3👍2
AbortController is more than you think
AbortController is a JavaScript API for creating an object with two properties, a signal and an abort() method, that can be used to abort tasks.
📌 Usage:
🟠You can use AbortController to abort HTTP requests via fetch().
🟠You can add event handlers using AbortSignal, which will allow you to automatically unsubscribe from events.
🟠AbortController also supports aborting streams.
📌 Advanced Features:
🟠Use AbortSignal.timeout() for automatic cancellation based on a timer.
🟠AbortSignal.any() allows you to combine multiple signals into one, making the API even more flexible.
🟠Cancellation error handling: When calling abort(), you can pass a cancellation reason, allowing for more flexible handling of canceled operations.
AbortController is a JavaScript API for creating an object with two properties, a signal and an abort() method, that can be used to abort tasks.
📌 Usage:
🟠You can use AbortController to abort HTTP requests via fetch().
🟠You can add event handlers using AbortSignal, which will allow you to automatically unsubscribe from events.
🟠AbortController also supports aborting streams.
📌 Advanced Features:
🟠Use AbortSignal.timeout() for automatic cancellation based on a timer.
🟠AbortSignal.any() allows you to combine multiple signals into one, making the API even more flexible.
🟠Cancellation error handling: When calling abort(), you can pass a cancellation reason, allowing for more flexible handling of canceled operations.
👍6❤1
How to Annul Promises in JavaScript
In JavaScript, you might already know how to cancel a request: you can use xhr.abort() for XHR and signal for fetch. But how do you cancel a regular Promise?
Currently, JavaScript's Promise does not natively provide an API to cancel a regular Promise. So, what we’ll discuss next is how to discard/ignore the result of a Promise.
In JavaScript, you might already know how to cancel a request: you can use xhr.abort() for XHR and signal for fetch. But how do you cancel a regular Promise?
Currently, JavaScript's Promise does not natively provide an API to cancel a regular Promise. So, what we’ll discuss next is how to discard/ignore the result of a Promise.
👍7❤2
🐌 15 page speed optimizations that sites ignore (at their own risk)
A recent analysis of twenty leading websites found a surprising number of page speed optimizations that sites are not taking advantage of – to the detriment of their performance metrics, and more importantly, to the detriment of their users and ultimately their business.
A recent analysis of twenty leading websites found a surprising number of page speed optimizations that sites are not taking advantage of – to the detriment of their performance metrics, and more importantly, to the detriment of their users and ultimately their business.
👍7🔥2❤1
“If” CSS Gets Inline Conditionals
All of this is conceptual at the moment and nothing is set in stone. We’re likely to see things change as the CSSWG works on the feature. But as it currently stands, the idea seems to revolve around specifying a condition, and setting one of two declared styles — one as the “default” style, and one as the “updated” style when a match occurs.
All of this is conceptual at the moment and nothing is set in stone. We’re likely to see things change as the CSSWG works on the feature. But as it currently stands, the idea seems to revolve around specifying a condition, and setting one of two declared styles — one as the “default” style, and one as the “updated” style when a match occurs.
👍12🤔1
⚡️ TypeScript and Everything You Need for Development
This article is designed to simplify the process of learning TypeScript through practical examples. You can always find more detailed information in the documentation or additional resources.
This article is suitable for both beginner developers who are just getting acquainted with TypeScript and experienced developers looking to deepen their knowledge of the language. Here, you will find a concise and informative overview of the key aspects of TypeScript that can be useful in day-to-day development. For your convenience, the table of contents includes links to specific TypeScript topics, allowing you to quickly jump to the parts of the material that interest you.
This article is designed to simplify the process of learning TypeScript through practical examples. You can always find more detailed information in the documentation or additional resources.
This article is suitable for both beginner developers who are just getting acquainted with TypeScript and experienced developers looking to deepen their knowledge of the language. Here, you will find a concise and informative overview of the key aspects of TypeScript that can be useful in day-to-day development. For your convenience, the table of contents includes links to specific TypeScript topics, allowing you to quickly jump to the parts of the material that interest you.
🔥5👍1