Search
Collective #545
2.9.2019
PWA Asset Generator * Leon Sans * Introduction to JavaScript Promises * The Enigma Machine
Collective #545 was written by Pedro Botelho and published on Codrops
Should a website work without JavaScript?
2.9.2019
The JS Party podcast just had a fun episode where they debated this classic question by splitting into two groups of two. Each group was assigned a "side" of this debate, and then let loose to debate it. I don't think anybody can listen to a show like this and not be totally flooded with thoughts!...
Working with Attributes on DOM Elements
30.8.2019
The DOM is just a little weird about some things, and the way you deal with attributes is no exception. There are a number of ways to deal with the attributes on elements. By attributes, I mean things like the id in <div id="cool"></div>. Sometimes you need to set them. Sometimes...
WDRL — Edition 273: Elegant Simplification, Power Usage of Web Content, and Native JavaScript Modules.
30.8.2019
Hey,
how can we build better web experiences? There are likely more things about it than I could list in this short introduction paragraph but here are a few examples from this week’s reading list. First, we can build simpler interfaces, not add new elements or new features and to ensure this,...
Reverse Lookups with JavaScript
28.8.2019
I’ve always loved exploring regular expressions because they’re one of those skills that’s never taught in school — you need to pick them up on the fly, messing up and fixing them along the way. Regex’s are incredibly powerful, and one power they have are referred...
Collective #543
26.8.2019
JavaScript: The Modern Parts * Ruffle * Pagemap * Mario HTML * Consume less, create more
Collective #543 was written by Pedro Botelho and published on Codrops
Promises and Static Values
23.8.2019
Async can throw a real wrench into the cogs of our programming workflows, all despite the fact that async is the modern JavaScript pattern. While async/await helps, there’s sometimes confusion about the way to have a single function that returns a value whether it exists or needs a Promise...
Navbar Nudging on @keyframers
22.8.2019
I got to be the featured guest over on The Keyframers the other day. We looked at a Dribbble shot by Björgvin Pétur Sigurjónsson and then slowly built it, taking some purposeful detours along the way to discuss various tech.
We start by considering doing it entirely in CSS, then go for some light...
Let’s Build a JAMstack E-Commerce Store with Netlify Functions
20.8.2019
A lot of people are confused about what JAMstack is. The acronym stands for JavaScript, APIs, and Markup, but truly, JAMstack doesn’t have to include all three. What defines JAMstack is that it’s served without web servers. If you consider the history of computing, this type of abstraction isn’t...
Bounce Element Around Viewport in CSS
19.8.2019
Let's say you were gonna bounce an element all around a screen, sorta like an old school screensaver or Pong or something.
You'd probably be tracking the X location of the element, increasing or decreasing it in a time loop and — when the element reached the maximum or minimum value —...
All the New ES2019 Tips and Tricks
13.8.2019
The ECMAScript standard has been updated yet again with the addition of new features in ES2019. Now officially available in node, Chrome, Firefox, and Safari you can also use Babel to compile these features to a different version of JavaScript if you need to support an older browser.
Let’s look...
Quick Gulp Cache Busting
7.8.2019
You should for sure be setting far-out cache headers on your assets like CSS and JavaScript (and images and fonts and whatever else). That tells the browser "hang on to this file basically forever." That way, when navigating from page to page on a site — or revisiting it, or refreshing...
Let Mavo Shine in Building Interactive Web Applications
6.8.2019
As you could guess from the title, this tutorial is dedicated to Mavo: a new, approachable way to create complex, reactive, persistent web applications just by writing HTML and CSS, without a single line of JavaScript and no server backend.
🐇 Follow the white rabbit!
Mavo is developed...
Collective #538
5.8.2019
How Does the Development Mode Work? * Photoronoi * Adblocking: How About Nah? * Scope in JavaScript - HTTP 203
Collective #538 was written by Pedro Botelho and published on Codrops
then on Objects
5.8.2019
Promises were a revelation in JavaScript development, allowing us to enjoy async processing and avoid callback hell. Many new APIs like Battery API, Cache API, and others use the promise API. One fact you may not know is that you can add a then method to any object to make it Promise-like!...
A More Accessible Portals Demo
31.7.2019
The point of the <portal> element (behind a flag in Chrome Canary) is that you can preload another whole page (like <iframe>), but then have APIs to animate it to the current page. So "Single Page App"-like functionality (SPA), but natively. I think that's pretty cool. I'm a fan...
Run useEffect Only Once
30.7.2019
React has a built-in hook called useEffect. Hooks are used in function components. The Class component comparison to useEffect are the methods componentDidMount, componentDidUpdate, and componentWillUnmount.
useEffect will run when the component renders, which might be more times than you think....
Collective #536
29.7.2019
Ciao * Building Beautiful UIs * Poolside FM * Livewire * Liquidfun * Practical Ways to Write Better JavaScript
Collective #536 was written by Pedro Botelho and published on Codrops
Optional Chaining
29.7.2019
For all of the improvements that the JavaScript language has added over the past few years, like the spread operator, default argument values, and arrow functions, there are still a few features I’d love to see implemented. On such feature is optional chaining. Optional chaining allows...
JavaScript Proxy with Storage
26.7.2019
The JavaScript Proxy API provides a wealth of “magic” within JavaScript, allowing you to use any object as sort of an alias that allows a wall of validation, formatting, and error throwing. Did you know that you could also employ the Proxy API as an abstraction to different types...