Tag Archives: javascript

Jake Archibald: “In The Loop” — Taking a close look into the browser’s Event Loop

Talk by Jake Archibald, as brought at JSConf.Asia 2018, taking a close look into the browser’s Event Loop: This talk looks at the browser’s event loop, the thing that orchestrates the main thread of the browser, which includes JavaScript, events, … Continue reading

Elsewhere , , , Leave a comment

react-fns – Browser APIs turned into declarative React components and HOCs

react-fns is a collection of imperative Browser API’s turned into declarative React components and higher-order components for lots of common situations. The <Network /> component for example is a wrapper around the Network Information API. import { Network } from … Continue reading

Elsewhere , , Leave a comment

ESNext: JavaScript “Nullish Coalescing Operator”

One of my favorite ECMAScript Proposals is the “Optional Chaining Operator”. Another proposal that forms great duo with it is the “Nullish Coalescing Operator” (sometimes also referred to as “Nullary Coalescing Operator”). Both proposals still are Stage-1, but don’t let … Continue reading

Original Content , 2 Comments

Fly and Control a Drone Using JavaScript

Whilst the video is only a sneak peek of a Code School tutorial, you can puzzle the pieces together yourself. The key part is the rolling-spider Node package which uses Bluetooth to communicate with the drone. var RollingSpider = require(‘rolling-spider’); … Continue reading

Elsewhere , , , Leave a comment

Lazy Loading images with IntersectionObserver

Extensive article on using the aforementioned IntersectionObserver to lazy load image assets on your page. First explains the difference between a regular Event and an Observer, before diving into the IntersectionObserver. const images = document.querySelectorAll('[data-src]'); const config = { rootMargin: … Continue reading

Elsewhere , , , , Leave a comment

urql – A Universal React Query Library

Ken Wheeler: There are some amazing solutions in the space already, notably Relay and Apollo, both of which are incredibly full-featured, brilliantly engineered, and wonderfully flexible. That said, these libraries might feel like a bit much to get started with … Continue reading

Elsewhere , , , Leave a comment

JavaScript: What’s new in ECMAScript 2018 (ES2018)?

At the latest TC39 meeting the new features that will make it into the “ECMAScript® 2018 Language Specification” (ES2018) have been selected. All proposals that have reached stage-4 since the consolidation of ES2017 got selected. This post gives one a … Continue reading

Original Content , 6 Comments

ResizeObserver now available in Chrome

Chrome 64 includes ResizeObserver: ResizeObserver notifies you whenever an element’s size changes, and provides the new height and width of the element, reducing the risk of layout thrashing. To use it create a new instance of it, and then make … Continue reading

Elsewhere , , 1 Comment

Can (a ==1 && a== 2 && a==3) ever evaluate to true?

Is it ever possible that (a ==1 && a== 2 && a==3) could evaluate to true, in JavaScript? This is interview question asked by a major tech company. My answer was that it’s impossible. They said nothing is impossible. It … Continue reading

Elsewhere , , 1 Comment

JavaScript: Removing a property from an object immutably by destructuring it

Say you have a JavaScript object like this: const user = { firstName: ‘Bramus’, lastName: ‘Van Damme’, twitter: ‘bramus’, city: ‘Vinkt’, email: ‘bramus@bram.us’, }; And now say you want to create a copy of the whole object, except for the … Continue reading

Original Content , 1 Comment