typescript

5th November 2024

Choosing Between type and interface in React

However, as I delved deeper into React and wrestled with complex projects, I realized that the ‘interface as default’ approach wasn’t always fitting. My explorations and projects led me to question that initial guidance. After years navigating the React trenches and countless hours of research, I’ve come to understand that the choice between “type” and “interface” isn’t black and white. The real answer is, it depends. If you’re using TypeScript with React, pondering whether to use “type” or “interface” to define your prop types, you’re not alone. Both have unique advantages and applications in the ever-evolving landscape of React development. […]
7th October 2024

How to Work with useMemo in React – with Code Examples

useMemo is a valuable tool in the React framework, designed to optimize performance by memoizing expensive computations. With useMemo, React can store the result of a function call and reuse it when the dependencies of that function haven’t changed, rather than recalculating the value on every render.  useMemo stands out as a powerful tool for optimizing performance without sacrificing code readability or maintainability. But it’s often overlooked or misunderstood by beginners.  In this comprehensive guide, we’ll discuss what useMemo is, how it works, and why it’s an essential tool for every React developer. What is useMemo? useMemo is a handy tool in React that helps make […]
31st August 2024

Release React Native 0.75

The release of React Native 0.75 marks a significant milestone with a series of impactful updates and changes aimed at improving performance, stability, and the overall developer experience. Below, we provide a comprehensive overview of the enhancements, new features, and breaking changes included in this version. For those interested in the previous version, you can review the details of React Native 0.74 by visiting the following link: Release React Native 0.74.0. Highlights 🚀 Enhancements in Yoga 3.1 and Layout Improvements React Native 0.75 includes Yoga 3.1, which brings several enhancements and new layout capabilities. One of the key highlights is the support […]
6th August 2024

Axios vs. Fetch API: Selecting the Right Tool for HTTP Requests

Axios vs. Fetch API know the key difference : In the field of software development, the ability to seamlessly interact with remote servers and exchange data over the web is very important. Whether it’s fetching data from an API, performing CRUD operations, or executing any other network-related task, the significance of making HTTP requests cannot be overstated. Two widely used JavaScript libraries, Fetch and Axios, have become top picks for developers seeking to handle HTTP requests. Axios and Fetch to see how they can be used to perform different tasks. Hopefully, by the end of the article, you’ll have a […]
6th July 2024

Difference between JavaScript and TypeScript

JavaScript JavaScript is the most popular programming language of HTML and the Web. JavaScript is an object-based scripting language which is lightweight and cross-platform. It is used to create client-side dynamic pages. The programs in JavaScript language are called scripts. The scripts are written in HTML pages and executed automatically as the page loads. It is provided and executed as plain text and does not need special preparation or compilation to run. History of JavaScript Netscape Communications Corporation programmer Brendan Each developed JavaScript. It was introduced in September 1995, which was initially called Mocha. However, after gaining popularity as the […]
21st February 2023

7 Tips That Make You a Better Typescript Programmer

Learning Typescript is often a rediscovery journey. Your initial impression can be pretty deceptive: isn’t it just a way of annotating Javascript, so the compiler helps me find potential bugs? Better Typescript Programmer Although this statement is generally true, as you move on, you’ll find the most incredible power of the language lies in composing, inferring, and manipulating types. This article will summarize several tips that help you use the language to its full potential. #1 Think in {Set} Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a […]
17th May 2022

Useful TypeScript and JavaScript shorthands to know

JavaScript and TypeScript share a number of useful shorthand alternatives for common code concepts. Shorthand code alternatives can help reduce lines of code, which is something we typically strive for. In this article, we will review common TypeScript and JavaScript shorthands. We will also explore examples of how to use these shorthands. JavaScript and TypeScript shorthands Using shorthand code is not always the right decision when writing clean and scalable code. Concise code can sometimes be more confusing to read and update. It is important that your code is legible and conveys meaning and context to other developers. Our decision to […]
24th May 2019

TypeScript 3.5 Fixes ‘unbearably slow’ Type-Checking Bug

New release candidate addresses regression in TypeScript 3.4 that impacts build times and editor operations TypeScript 3.5, the latest version of Microsoft’s popular typed superset of JavaScript, is now available in a release candidate. The update is set to add optimizations for type-checking, addressing a serious speed regression introduced with the previous release. With TypeScript 3.5, Microsoft’s TypeScript development team focused on optimizing code paths and stripping down certain functionality to make TypeScript faster. Compile times have fallen compared to TypeScript 3.4; code completion and other editor operations should be “snappier” as well, the TypeScript developers noted. In making these […]