Instead of doing the popular Advent of Code, this year I tried to complete the Advent of TypeScript. In this article, you'll find my solutions and some details on how they work or what I learned while solving the challenge.
10 posts tagged with "Programming"
View All TagsThe Concept of Injector in Angular
An Injector
is a mechanism dedicated to dependency injection in Angular. Not all frameworks build their Dependency Injection (DI) the same way. For example, the Spring IoC Container can be mentioned for the famous Java framework. The Angular documentation has long emphasized providers
, leaving aside other elements necessary for DI. Injectors
are no exception, which is why I propose to see together how they work.
Managing CSS Compatibility
With the omnipresence of Babel and TypeScript in the Frontend universe, the JavaScript compatibility of our applications is (almost) no longer an issue. For HTML, only a few attributes have been added since HTML5 for bonus features (lazyload, prefetch, etc.). They are generally ignored by incompatible browsers. What about CSS? There are no proper polyfills, very heterogeneous support, and even a slight misstep with display: grid
can be disastrous for the visuals. So, how do we rationalize our CSS? Let's explore that together.
Goodbye Redux
Let's talk about application-level state management. Local states (React Hook, Vue Composable, Angular Service + RxJS Subject) have limited use by definition. With the extent of the React ecosystem in the professional world, Redux has become the obvious answer to the State Management challenge. Let's explore the fairly natural process that leads us to Redux and take a step back to reconsider our choices.
Optional Chaining: Best Friend or Worst Enemy?
Integrated into ES2020, present since 2018 in Babel, and since version 3.7 of TypeScript, optional chaining is an operator widely used today. Although the usefulness of such an operator is undeniable, let's explore together the biases and bad practices that can emerge from its usage.