Menu

JavaScript News

Two Lessons I Learned From Making React Components

December 18th, 2019

Here’s a couple of lessons I’ve learned about how not to build React components. These are things I’ve come across over the past couple of months and thought they might be of interest to you if you’re working on a design system, especially one with a bunch of legacy technical decisions and a lot of…

Detecting Inactive Users

December 13th, 2019

Most of the time you don’t really care about whether a user is actively engaged or temporarily inactive on your application. Inactive, meaning, perhaps they got up to get a drink of water, or more likely, changed tabs to do something else for a bit. There are situations, though, when tracking the user activity and…

December 2019 Security Releases Node.js

December 12th, 2019

The Node.js project will release new versions of all supported release lines on or shortly after Tuesday, December 17, 2019, UTC. The only update in these releases will be an updated version of npm addressing the vulnerability announced in https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli. In the meantime, users should update to npm 6.13.4 by following the instructions provided in…

Just Sharing My Gulpfile

December 11th, 2019

Seemingly out of the blue, the Gulp processing I had set up for this site started to have a race condition. I’d run my watch command, change some CSS, and the processing would sometimes leave behind some extra files that were meant to be cleaned up during the processing. Like the cleanup tasks happened before…

Techniques for Rendering Text with WebGL

December 6th, 2019

As is the rule in WebGL, anything that seems like it should be simple is actually quite complicated. Drawing lines, debugging shaders, text rendering… they are all damn hard to do well in WebGL. Isn’t that weird? WebGL doesn’t have a built-in function for rendering text. Although text seems like the most basic of functionalities….

CSS Architecture for Modern JavaScript Applications

December 6th, 2019

There is a lot to like from Mike Riethmuller here:

  • The title. When you’re building a website from JavaScript-powered components anyway, that is a moment to talk about how to do styling, because it opens some doors to JavaScript-powered styles that you probably wouldn’t otherwise choose.
  • The personal experience and pragmatism. Drawing on five years of consulting, he’s seeing that component re-use and style understandability is suffering, not improving, partly due to every team having different approaches. He says “it’s

Read article

The post CSS Architecture for Modern JavaScript Applications appeared first on CSS-Tricks.

Filtering Lists Dynamically With Vue on the Server Side is Easier Than You’d Think

December 4th, 2019

I recently attended the ARTIFACT conference in Austin, TX, and was inspired by a few talks about accessibility through the lens of site performance. It became clear to me that there is this tendency to rely on big JavaScript frameworks to handle the work — like React, Vue, and Angular — but that can be…

Testing React Hooks With Enzyme and React Testing Library

November 29th, 2019

As you begin to make use of React hooks in your applications, you’ll want to be certain the code you write is nothing short of solid. There’s nothing like shipping buggy code. One way to be certain your code is bug-free is to write tests. And testing React hooks is not much different from how…

When your dependencies break your software, wouldn’t you like them to fix it?

November 27th, 2019

We at Allianz Global Digital Factory (GDF) use the tooling of Angular to keep our ecosystem in sync. Our main asset is our user interface (UI) component library, that enables teams in Allianz to use ready-made UI components for building their apps. The main techniques we use are Schematics and ng update. This is something…

An Introduction to the Picture-in-Picture Web API

November 26th, 2019

Picture-in-Picture made its first appearance on the web in the Safari browser with the release of the macOS Sierra in 2016. It made it possible for a user to pop a video out into a small floating window that stays above all others so that they can keep watching while doing other things. It’s an…