The Deep Dive #14

Feb 24, 2021

Refactoring Angular codebase, 5 Types Of React's Application State and CSS utility classes paradigm

Web development

​CSS Utility Classes and "Separation of Concerns"

The article describes a transition from a very "semantic" approach in CSS to something much more like what is often called "functional CSS" (think Tailwind).

​Switching from OOP to Functional Programming

A nice introduction to functional concepts for programmers used to an imperative style. Although functional programming doesn't have answers to all problems, it certainly has some interesting ideas like immutability that allows for better architecture.

​undefined vs. null revisited

Many programming languages have one “non-value” called null. It indicates that a variable does not currently point to an object – for example, when it hasn’t been initialized yet. In contrast, JavaScript has two such non-values: undefined and null. This blog explains how they differ and how to best use or avoid them.

​Be careful with using functions as callbacks

The article explores a pattern where a programmer passes a function that is not designed be a callback to other functions. This can lead to problems if a library is updated and parameters to the function change.

​The Import On Interaction Pattern

The article describes a technique of lazy-loading non-critical resources, such as images or video content, only when a user interacts with UI requiring it.

      Angular

      ​How to refactor an Angular codebase

      If you see a project ridden with problems and bad practices, it might be tempting to start refactoring right away. But it is important to clear up several issues before getting to work. This article explains how.

      ​Making HostBinding work with Observables

      Today we cannot use HostBinding with Observable data — it requires a plain value. This is a pretty sought-after feature. Learn from the article how we can implement it while we wait for the official support.

      ​Implementing reusable and reactive forms in Angular

      This article will teach you two ways to implement reactive and reusable forms that have the capability to be used as sub-forms and also be used as standalone forms.

      React

      ​The 5 Types Of React Application State

      The author of the article identifies five types of state in React. Each type of state has a number of rules which it follows. It interacts with the other types of state in well defined ways — as long as it follows the rules. And based on these rules, you’ll find that there are ways of storing the state which just make sense.

      Releases & News