Menu

JavaScript News

Lots of Ways to Use Math.random() in JavaScript

November 30th, 2020

Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, it’s not possible for an actual 1 to be returned). Math.random(); // returns a random…

Rendering Spectrum

November 24th, 2020

Here are the big categories of rendering websites: Client: ship a <div id=”root”></div> and let a JavaScript template render all of it. Static: pre-render all the HTML. Server: let a live server process requests and generate the HTML response. They are not mutually exclusive. A website could statically pre-render 75% of it’s pages (say, blog…

Creating UI Components in SVG

November 23rd, 2020

I’m thoroughly convinced that SVG unlocks a whole entire world of building interfaces on the web. It might seem daunting to learn SVG at first, but you have a spec that was designed to create shapes and yet, still has elements, like text, links, and aria labels available to you. You can accomplish some of…

DRY-ing up styled-components

November 23rd, 2020

I like working with styled-components. They allow you to write CSS in your JavaScript, keeping your CSS in very close proximity to your JavaScript for a single component. As a front-end developer who loves to dissect a web page and break it down into reusable components, the idea of styled-components brings me joy. The approach…

Creating WebGL Effects with CurtainsJS

November 18th, 2020

This article focuses adding WebGL effects to <image> and <video> elements of an already “completed” web page. While there are a few helpful resources out there on this subject (like these two), I hope to help simplify this subject by distilling the process into a few steps: Create a web page as you normally would….

Node.js November 2020 Security Releases

November 13th, 2020

Summary The Node.js project will release new versions of 15.x, 14.x, and 12.x on or shortly after Monday, November 16th, 2020. These releases will fix: One high severity issue Impact The 15.x release line of Node.js is vulnerable to one high severity issue. The 14.x release line of Node.js is vulnerable to one high severity…

Version 11 of Angular Now Available

November 11th, 2020

Photo of a Torch Ginger by Jules Kremer Welcome to the Angular version 11 release. Version 11.0.0 is here and we’ve got some great updates for Angular developers everywhere. This release has updates across the platform including the framework, the CLI and components. Let’s dive in! What’s in this release? Updates on Operation Byelog When we shared Angular’s Roadmap,…

A Continuous Integration and Deployment Setup with CircleCI and Coveralls

November 9th, 2020

Continuous Integration (CI) and Continuous Deployment (CD) are crucial development practices, especially for teams. Every project is prone to error, regardless of the size. But when there is a CI/CD process set up with well-written tests, those errors are a lot easier to find and fix. In this article, let’s go through how to check…

How to Create a Commenting Engine with Next.js and Sanity

November 6th, 2020

One of the arguments against the Jamstack approach for building websites is that developing features get complex and often require a number of other services. Take commenting, for example. To set up commenting for a Jamstack site, you often need a third-party solution such as Disqus, Facebook, or even just a separate database service. That…

Quick LocalStorage Usage in Vue

November 5th, 2020

localStorage can be an incredibly useful tool in creating experiences for applications, extensions, documentation, and a variety of use cases. I’ve personally used it in each! In cases where you’re storing something small for the user that doesn’t need to be kept permanently, localStorage is our friend. Let’s pair localStorage with Vue, which I personally…