May 2021

Why does React state need a new object/array?

Why does React state need a new object/array?

  • May 25, 2021

If you have been using React for a while, you are familiar with how state update works. There are a lot of internal optimizations that React makes for faster rendering. One of the implementation details of the React internals is that it checks whether the given state object has actually...

Using utility types for transforming TypeScript types

Using utility types for transforming TypeScript types

  • May 20, 2021

TypeScript provides some built-in utility types that help facilitate transformations of types from one form to another. These utilities are available globally. They can be quite handy in various situations. TypeScript generics Before understanding the TypeScript utility types, it is important to understand type aliases and generics. You can create...

TypeScript: the difference between interface and type

TypeScript: the difference between interface and type

  • May 13, 2021

Once we start exploring TypeScript, we start using interfaces and types without really understanding the differences between them. I am guilty of doing that as well. It is simple to get started with them and keep using them. But, at some point, it becomes important to know the difference between...