Shubham Vora has Published 957 Articles

How to send one or more files to an API using axios in ReactJS?

Shubham Vora

Shubham Vora

Updated on 27-Feb-2023 12:05:46

1K+ Views

ReactJS is a frontend library, so we can use it to create web pages. It’s natural to show data in real-time applications, and the backend manages it. So, whenever React needs data to show on the web page, it gets it from the backend by making API calls. Sometimes, we ... Read More

How to create Menu Item Component in ReactJS?

Shubham Vora

Shubham Vora

Updated on 27-Feb-2023 12:01:53

7K+ Views

The Menu item component shows users various menu options, and they can select any option from the menu item component. The menu item component in React Js is similar to the element in HTML, or we can say it is a dropdown menu. Also, menu components contain a submenu ... Read More

How to create Instagram Like button in ReactJS?

Shubham Vora

Shubham Vora

Updated on 27-Feb-2023 11:58:18

2K+ Views

Most of all, you have used Instagram and have looked at the Like button given below every post. There are two things to notice about Instagram Like button: one is its shape is a heart shape which we need to create, and another is it fills up with red colour ... Read More

Window Navigator in TypeScript

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:54:16

3K+ Views

The Window object, known as the Global TypeScript object, represents the current web page in a browser window. The location, history, and document of the current page, as well as other methods and attributes, can all be accessed and controlled using this method. The Navigator object is a property of ... Read More

How to Enforce the type of the indexed members of a Typescript object

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:53:21

604 Views

The programming language TypeScript is based on JavaScript and is strongly typed, object-oriented, and compiled. The language is improved with tools like static typing, classes, and interfaces that help with early error detection and make JavaScript more manageable. One of TypeScript's features is the ability to enforce the types of ... Read More

How to Develop Generic Classes

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:51:40

219 Views

Before developing the actual generic class, let's first learn about the Generic class. A TypeScript class known as generic may deal with numerous types of data. It is a variety of arguments and is displayed using angle brackets (). This represents the kind of data the class will use to ... Read More

How to solve too many try catch in Typescript?

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:49:15

1K+ Views

We can use the try-catch statements to solve errors in TypeScript. Sometimes, we require adding more than one try-catch block in the code to handle multiple errors. When we add multiple try-catch statements in the code, the code becomes unreadable, and it becomes a headache for developers to refactor. In ... Read More

How to create asynchronous function in TypeScript?

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:47:51

7K+ Views

Asynchronous programming allows us to perform multiple tasks parallelly. We can use the async/await keyword to make the function asynchronous. Before we start, let’s learn the need for asynchronous programming and function. It takes some time to respond when we fetch data from the API. Now, think we need to ... Read More

How to create conditional types in TypeScript?

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:45:25

1K+ Views

In TypeScript, we need to define the types for every variable and object as it is a type of strict language and also contains conditional types. From the word conditional type, we can predict that we need to choose a variable based on a particular condition. Yes, you heard right. ... Read More

How to convert string to number in TypeScript?

Shubham Vora

Shubham Vora

Updated on 21-Feb-2023 15:42:38

28K+ Views

The string and number are both primitive data types in TypeScript. Sometimes, we get the number in the string format, and we need to convert the string values to the number to perform mathematical operations on the value. If we perform the mathematical operation on the string values, it gives ... Read More

Advertisements