Search

Nalezeno "javascript": 269

Array.prototype.at


Working with arrays is an essential skill in any programming language, especially JavaScript, as we continue to rely on external data APIs. JavaScript has added methods like find and `findIndex recently, but one syntax I love from languages like Python is retrieving values by negative indexes. When...

Responsible JavaScript


High five to Jeremy on the big release of Responsible JavaScript on A Book Apart. There is a lot of talk about how the proliferation of JavaScript has had a negative impact on the web, but now we have … The post Responsible JavaScript appeared first on CSS-Tricks. You can support CSS-Tricks...

Command Line trash


One of the first commands you learn when experimenting with command line is rm, the utility for deleting files and directories. Deletion is a core computer UI operation but operating systems use a “Trash” paradigm, where files are stored before truly deleted. With the rm utility...

Links on React and JavaScript II


How To Use The Vite Build Tool with React — Vite is hot, in part, because it’s based on esbuild and wickedly fast. It’s from Evan You of Vue fame, but it’s not a Vue-specific tool. Here, NARUHODO covers how … The post Links on React and JavaScript II appeared first...

How to Create a UUID in JavaScript


The UUID identifier has been used in programming since the days a baby-faced David Walsh became a professional software engineer. My first exposure to UUIDs was via a ColdFusion app I inherited and … the less we say about that the better. In any event, I was recently surprised to see that...

Comparing Methods for Appending and Inserting With JavaScript


Let’s say we want to add something to a webpage after the initial load. JavaScript gives us a variety of tools. Perhaps you’ve used some of them, like append, appendChild, insertAdjacentHTML, or innerHTML. The difficult thing … The post Comparing Methods for Appending...

AggregateError


One of the big themes of the web these days is concurrency, which leads to accomplishing tasks asynchronously. In doing so, the possibility of multiple errors can occur. Instead of providing a generic error, optimally you’d provide a wealth of error information. TheAggregateError error lets...

jq for JSON


I old enough to remember when we thought XML was going to change the programming world…then JSON saved us from that hell. Parsing and querying JSON data is fundamental task we’ve all coded for, but sometimes I just want to get some data locally with minimal fuss. I just learned of...

Introduction to the Solid JavaScript Library


Solid is a reactive JavaScript library for creating user interfaces without a virtual DOM. It compiles templates down to real DOM nodes once and wraps updates in fine-grained reactions so that when state updates, only the related code runs. This … The post Introduction to the Solid...

React usePrevious Hook


Hooks are essential for the functional component pattern in React. One frequent logic comparison with class components was comparing a previous prop value with a current prop value via lifecycle methods. So what’s an easy pattern for duplicating previous value comparisons in functional...

Choice Words about the Upcoming Deprecation of JavaScript Dialogs


It might be the very first thing a lot of people learn in JavaScript: alert("Hello, World"); One day at CodePen, we woke up to a ton of customer support tickets about their Pens being broken, which ultimately boiled down to … The post Choice Words about the Upcoming Deprecation of JavaScript...

The State Of Web Workers In 2021


You gotta appreciate the tenacity of Surma. He’s been advocating for Web Workers as a path forward to better-feeling websites for a lot of years now. He’s at it again making sure we all understand the landscape: […] regardless … The post The State Of Web Workers In 2021...

onInput Event


Coding HTML forms has been painful my entire career. Form controls look different between operating systems and browsers, coding client side and server side validation is a nightmare, and inevitably you forget something somewhere along the line. Some behaviors don’t act the way you’d...

ES2021 Features


Hemanth HM very succinctly shows off ES2021 features. Gosh it doesn’t feel like that long ago that all we could talk about is ES2015, and now that’s over a half-decade behind us. New things include “arbitrarily chuck underscores in numbers.” … The post ES2021 Features...

Slinkity


Perhaps the #1 reason I love Astro is that it brings the JavaScript component authoring experience to the Static Site Generator world with zero JavaScript (except bits you very specifically opt-in to). That HTML-first approach is also why I like … The post Slinkity appeared first...

ECMAScript proposal: JSON modules


Dr. Axel Rauschmayer looks at JSON modules, which is already live in Chrome 91 (but nothing else). It looks just like an ES Modules-style import, only you asset the type at the end. import configData from './config-data.json' assert {type: … The post ECMAScript proposal: JSON modules...

Typewriter Animation That Handles Anything You Throw at It


I watched Kevin Powell’s video where he was able to recreate a nice typewriter-like animation using CSS. It’s neat and you should definitely check it out because there are bonafide CSS tricks in there. I’m sure you’ve seen other CSS … The post Typewriter Animation That Handles Anything...

Fix Seeing “0” in Your JSX Code


The early days of the web felt like the wild west when it came to coding practices — just make it work. Then we became enlightened to better practices, separating HTML from CSS and JavaScript. Then came React and JSX, where we combine JavaScript, HTML, and even CSS with Styled Components...

Beginner JavaScript Notes


Wes has a heck of a set of “notes” for learning JavaScript. It’s organized like a curriculum, meaning if you teach JavaScript, you could do a lot worse. It’s actually more like 85 really fleshed-out blog posts organized into sections … The post Beginner JavaScript...

Body Toggle


I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit: It’s a one-liner that toggles the class on the <body> so you can mock up different states and toggle between them on click. <body onclick="this.classList.toggle("active");" Could … The post...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace