Category: Web Design – Javascript

Yin Yang with a twist – 4 circles and 20 lines of pure JS

How much fun can you have with four circles and about twenty lines of pure JavaScript? Let’s find out! The animation above has three phases: 1. spinning yin yang 2. spinning yin yang with color cycling 3. something weird-but-cool-looking Click on the image to restart the animation. We’ll start with an HTML5 Canvas, two blue circles [lines 19-20] and two red…

Notification Service based on Custom Elements

Notification Service provides a simple show/hide message. It is based on CustomeElements and may be integrated with any framework. Push notification works through CustomEvent dispatcher. Notification Service supports all popular browsers, including Internet Explorer 11, although some polyfills are required for IE 11. Please see here. Installation npm npm install notification-service-js yarn yarn add notification-service-js Usage // As a module import ‘notification-service-js’ // As a…

Immutability in React and Redux: The Complete Guide

Immutability can be a confusing topic, and it pops up all over the place in React, Redux, and JavaScript in general. You might’ve run into bugs where your React components don’t re-render, even though you know you’ve changed the props, and someone said, “You should be doing immutable state updates.” Maybe you or one of your teammates regularly writes Redux reducers that mutate state, and…

Testing React with Kent C. Dodds

I’m sure that Kent needs no introduction, he’s a prolific contributor to the React community and ecosystem. One of the things he talks a lot about is testing, which just so happens to be one of my favourite topics, too! In this hour long hangout, Kent and I compared our approaches, both where they align and where we have slightly different opinions. If you’re interested…

An imperative guide to setState in React

States in React, like props, are objects that are used to store data and affect how the component renders or behaves. Unlike props, states are managed completely within the component and can be changed over time. The change in state for React components can be a result of triggers from user actions, network activity, API requests or specific application behavior. Components that have a state…

Survival guide for new developers

Hackathon I recently went to If you started to learn programming and decided to go serious — or you’re fresh out of school with no job experience — this is the perfect article for you. I will address key points and hidden truths I’ve accumulated over the time working as a developer. It’s not you — Coding is difficult No one said coding is easy — If it was easy, everyone would be doing…

Celebrating 10 Years of the V8 JavaScript engine

Celebrating 10 Years of V8 — The V8 JavaScript engine has had a huge impact on the growth of JavaScript, taking it from being a relatively slow scripting language to something surpassing many other languages on performance. This post celebrates V8’s tenth anniversary with some details about its history and development. Mathias Bynens Next Generation Package Management with Tink — tink (formerly ‘crux’) is a…

How to Deploy Your Secure Vue.js App to AWS

This article was originally published on the Okta developer blog. Thank you for supporting the partners who make SitePoint possible. Writing a Vue app is intuitive, straightforward, and fast. With low barriers to entry, a component-based approach, and built-in features like hot reloading and webpack, Vue allows you to focus on developing your application rather than worrying about your dev environment and build processes. But,…

Next Generation Package Management

What if installs were so fast they could happen in the background, just by using Node? What every file in your dependencies could be guaranteed to be bit-by-bit identical to what’s on the registry? What if working on a new project was as simple as clone and run? What if your build tools got out of your way? Introducing tink, a proof of concept implementation…

Aliases with JavaScript Destructuring

Destructuring in JavaScript has totally changed the way JavaScript is written these days;  code is more concise to write but but, from a visual standpoint, the syntax of the language has changed so much.  Any good developer knows, however, that change is the constant we live in. The basic idea behind destructuring in object literals is as follows: const obj…