Photo by Kelli McClintock on Unsplash

Modern web applications consist of hundreds and thousands of files of different kinds. To manage this complexity and streamline app delivery developers started using the same approach as on desktops: compile & link. In relation to a web application compilation usually means transpiling, while linking means bundling.

Same goes for libraries and other packages that web applications depend on and install from registries like npm. But the actual code in these registries is almost always exists in a form of the old ES5. …

Short answer for those who don’t want to read:
Functional programming is the true theme of React. Virtual DOM is just one of its consequences and isn’t really a benefit. It is slower by definition, and there could be no DOM at all if you’re using React for sound or 3D rendering. Choose React if it matches your mindset, not because it was faster a couple of years ago.

Let’s start with the opposite of virtual DOM: the real DOM. We’re going to use an uncomplicated Counter component, who’s content HTML may look like this:

Count: 123
<button type="button">Increment</button>…

Photo by Dimosthenis Papamichail on Unsplash

Processing data in a shell may be very convenient, especially for experienced terminal users. You pipe text data through various commands, redirect streams, read and write files.

However, shell commands are diverse. Identical commands on some operating systems may have different options or those options may have different meaning. Some commands exist in different versions (grep, rgrep, sgrep, etc.), all with small tweaks here and there. Usually, it’s not that difficult and just requires some time to remember and find your favorites.

But if you’re a JavaScript developer, you have an additional tool to choose. With 0.5.0 release of the…

Photo by Lenny Kuhne on Unsplash

Undercut is a JavaScript library for processing data in a lazy or deferred manner by building pipelines.

The focus of the library is on leveraging existing JavaScript features like Iterators/Generators while having balanced API: not being Java/C# influenced or heavily functional. Undercut also aims to avoid prototype extension and a situation, where you need to name a method as “flat” instead of “flatten”. You may also use it as an alternative to Lodash’s “chain” functionality with support for lazy execution, tree shaking, etc.

Imagine a conveyor on a car factory: a chain of operations from welding body parts and painting…

Flux was presented in May 2014 and quickly become a new movement in web development. Today Flux isn’t that widely used. The driver seat was taken by its offspring Redux. Anyway, it’s still interesting to discuss some of the issues with Flux’s architecture about which you don’t even think in Redux.

Photo by Flemming Fuchs on Unsplash

“Cannot dispatch in the middle of a dispatch” was one of them.

This error had to mean that you did dispatch() in a wrong time and need to move it somewhere else. The most brave people just ignored it by wrapping the dispatch into setTimeout(). …

Sometimes people ask what is the best way to handle asynchronicity in Redux? There is official documentation about it, but I suggest revisiting some basic concepts to see if it’s really that simple.

Redux (right) meets Asynchronicity (left) [Blade Runner 2049 © Warner Bros. Entertainment Inc.]

The basics

A state is an object. It’s used as a value somewhere on UI or for its rendering:

username: "zerocool"

An action is an object too. It describes an event (or a command) happened in app’s world. By convention it must have the “type” property containing event name and may have some other data:

type: "ADD_TODO",
text: "Hello"

A reducer is a function. …

Anton Alexandrenok

A /dev/null developer and entrepreneur.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store