Book Your Free Call
Tim Mouskhelichvili • August 9, 2022 • 3 minutes to read
One of the most typical tasks when working on a React application is rendering a list of objects as components. The easiest way to map an array of objects in React is to use the JavaScript map function. This [...]
Tim Mouskhelichvili • August 8, 2022 • 3 minutes to read
React provides a simple way of handling events for front-end developers. A common use case for React developers is passing an extra parameter through the onClick event to the callback function. Luckily, React makes it easy to do. This [...]
Tim Mouskhelichvili • August 6, 2022 • 2 minutes to read
React code is usually separated into components, independent bits of code that you can reuse. To pass data from component to component, developers can pass data as props. Sometimes, developers need to pass a function as a prop. Luckily [...]
Tim Mouskhelichvili • August 3, 2022 • 3 minutes to read
If you come from a computer science object-oriented programming background, you may want to utilize some of the design patterns you've always used but in TypeScript. One of the most well-known design patterns is the singleton. A singleton is [...]
Tim Mouskhelichvili • August 2, 2022 • 3 minutes to read
When working on a TypeScript repository, developers want to keep the files short, making it easier to navigate the code and debug. This leads to the TypeScript repository having many different files. For those TypeScript files to work together [...]
Tim Mouskhelichvili • August 1, 2022 • 3 minutes to read
The TypeScript compiler is excellent at showing errors and warning when it detects something is wrong with the code. Sometimes, however, a developer may want to ignore an error on the next line AND still compile the code. Luckily [...]
Tim Mouskhelichvili • July 27, 2022 • 3 minutes to read
When looking through other TypeScript libraries' source code, maybe you have encountered a strange exclamation mark operator placed after a member. This operator is a TypeScript-only feature and does not exist in JavaScript. It is called the non-null assertion [...]
Tim Mouskhelichvili • July 26, 2022 • 2 minutes to read
Named parameters exist in multiple languages such as C# or PHP, and developers from those languages may expect that TypeScript also provides this feature. Unfortunately, this language does not provide true named parameters. However, it is still possible to [...]
Tim Mouskhelichvili • July 25, 2022 • 2 minutes to read
Sometimes, developers need to declare class constants accessible by all the class's methods. Luckily, this is very easy to accomplish in TypeScript. To declare class constants in TypeScript, you can use the readonly keyword, like so: class Cat { [...]
Tim Mouskhelichvili • July 20, 2022 • 3 minutes to read
Sometimes developers need to define a default parameter for a TypeScript function. Luckily, TypeScript, just like its counterpart JavaScript, offers a simple way to define default parameters. In TypeScript, you can define a default parameter like so: const getUser [...]