Tim Mouskhelichvili • June 12, 2023 • 2 minutes to read
When developing your next hit web application project in React, you may need to refresh a page. But how do you do it? This article explains how to refresh a page in React, shows how to persist the state [...]
Tim Mouskhelichvili • June 5, 2023 • 3 minutes to read
When it comes to React development, testing your code is almost as important as writing it. One of the best libraries for this task is Jest (developed by Facebook). When testing a piece of React code, a developer often [...]
Tim Mouskhelichvili • May 29, 2023 • 2 minutes to read
Sometimes, when making requests with the axios library, the server to which you are making the call hangs, and the request takes forever to complete. For those cases, you need to set up a request timeout so your uses [...]
Tim Mouskhelichvili • May 24, 2023 • 2 minutes to read
Nowadays, many APIs are not accessible without first authenticating. This helps to provide a safe and secure environment for the API users. After the authentication, the user can safely make calls to the API. But how do you authorize [...]
Tim Mouskhelichvili • May 17, 2023 • 2 minutes to read
Sometimes, when developing a TypeScript project, a developer may need to extract types from a union type. Luckily, this operation is easy to do with the built-in Extract utility type. The Extract<Type, Keys> utility type constructs a new [...]
Tim Mouskhelichvili • May 1, 2023 • 2 minutes to read
Sometimes, when developing a TypeScript project, developers need to exclude a member from an existing union type. Luckily, this operation is easy to do, using the Exclude utility type. The Exclude<UnionType, ExcludedMembers> utility type, constructs a new type [...]
Tim Mouskhelichvili • April 29, 2023 • 2 minutes to read
Sometimes when developing a TypeScript project, developers need to manipulate existing union types and remove null and undefined. Luckily, this task is easy to accomplish using the NonNullable type. The NonNullable<Type> constructs a new type by excluding null [...]
Tim Mouskhelichvili • April 17, 2023 • 2 minutes to read
TypeScript offers many utility types to help developers work better with types. One of them is the ReturnType utility type. But what is it, and how does it work? The ReturnType utility type helps you create a new type [...]
Tim Mouskhelichvili • April 10, 2023 • 2 minutes to read
When developing a TypeScript project, developers often need to convert a string to a boolean. But how do you do it? This article shows multiple methods to convert a string to a boolean in TypeScript with code examples. Let's [...]
Tim Mouskhelichvili • March 31, 2023 • 2 minutes to read
When developing a TypeScript project, developers often need to make a property optional inside an interface, type, or class. Luckily, this is easy to do. To mark a property as optional in TypeScript, you can place a question mark [...]