Found 8895 Articles for Front End Technology

How to install yup in react native in JavaScript?

Shubham Vora
Updated on 24-Apr-2023 16:57:18

4K+ Views

The Yup is an NPM package we can install in the react-native application. It is used to validate the form values stored in a single object. Also, we can add different kinds of validations to the different form fields using the Yup. Users can execute the below command in the project directory to install the Yup in react native. npm i Yup Users can use the below command if they are using the Yarn. yarn i Yup Syntax Users can follow the syntax below to use the Yup for the form validation in the react-native application. const schema ... Read More

How do you receive server-sent event notifications in JavaScript?

Shubham Vora
Updated on 24-Apr-2023 16:55:10

582 Views

The server-sent event is a unidirectional way to communicate between the server and the client. When we only require to send data from server to client, but not from client to server, we can use the server-sent events. We can use the server-sent events by establishing the connection between the client and server. Here, the server sends the data, and the client receives the data and handles the data to show on the web page. The server can be anything, such as Node, PHP, or Ruby applications. So, when the server sends the data, the ‘message’ event fires on the ... Read More

Fixed Options in Searchbox in ReactJS

Shubham Vora
Updated on 24-Apr-2023 16:52:52

56 Views

Sometimes, developers require to add the fixed options in the search box while creating the search bar. For example, you are developing a web application containing different web pages related to cars, bikes, other vehicles, etc. Also, you require to add a search bar on every web page. So, you may be required to add the fix tags like car, bike, or some car or bike brands as fixed tag in the search bar to highlight. In this tutorial, we will learn to add fixed options in search box in ReactJS using the AutoComplete component of the Material UI library. ... Read More

Firebase to get url

Shubham Vora
Updated on 24-Apr-2023 16:48:09

2K+ Views

Firebase is a backend-as-a-service (BAAS) that provides different services. It includes authentication, cloud storage, hoisting, etc., in the services. Basically, it makes it easy for developers to integrate the authentication, database, etc., in the mobile or web application. In this tutorial, we will explore the cloud storage of Firebase. We will learn to upload images in the Firebase cloud storage and get the URL of the image, which we can use anywhere. Users should follow the steps below to set up the Firebase account and integrate it with a single-page web application. Step 1 − First, Go to the ... Read More

Firebase Integration with Web

Shubham Vora
Updated on 24-Apr-2023 16:45:50

393 Views

Firebase was started by Google in 2014, providing backend services to its users. It provides different kinds of high-quality services which we can use to develop mobile and web applications. For example, it provides a real-time database, user authentication, cloud storage, etc. Furthermore, it also provides analytics to analyze the application’s traffic. It is more popular due to its quick setup. In this tutorial, we will learn to integrate Firebase authentication into the one-page web application. Users should follow the steps below to set up the Firebase account and integrate it with a single-page web application. Step 1 − ... Read More

How to convert date to another timezone in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 17:00:51

8K+ Views

JavaScript has a new Date() constructor which is used to create a date object to get the current date and time. This date object uses the UTC timezone or the client browser's timezone, i.e. if you are in India and use the new Date() constructor to get the date and time, you will get your local time. But sometimes, we may need to get the timezone of another country, which we can't do directly. These can be done using the toLocaleString() method or the format() method. By the end of the article, you will be able to get the date ... Read More

How to convert decimal to hex in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 16:59:14

843 Views

For any computer programmer who is working with low-level language or assembly language, it is a fundamental task to convert decimal to hex or hexadecimal. In web development we use colors and to represent them it is a common practice to use hex color codes. In Javascript, it is very easy to convert decimal to hexadecimal because of the built-in functions and methods provided by ECMA. In this article, we will discuss multiple ways to convert decimal to hex in javascript with appropriate examples. Using toString() method Using Custom Function Using the toString() Method As the name suggests ... Read More

How to Convert CFAbsoluteTime to Date Object and vice-versa in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 16:58:31

330 Views

CFAbsoluteTime is the elapsed time since Jan 1, 2001, 00:00:00 UTC. This is a standard time format on Apple devices. On the other hand, a date object is a built-in object in JavaScript used to represent date and time values. It has many methods for providing formatting and converting date & time from one form to another. The main difference between CFAbsolute Time and JavaScript Date objects is their format. CFAabsolute time is a numeric value representing the number of milliseconds since the Unix epoch whereas a date object is an object representing a specific date and time, year, month, ... Read More

How to convert hyphens to camel case in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 16:57:25

2K+ Views

As a developer, we often encounter hyphenated strings. A hyphenated string makes our code more readable when the string’s length is high and the name is very complex. To solve this problem we use a camel case. Camel case is a very popular naming convention, in which we combine multiple words and make one string by capitalizing the first letter of each string except the first string. In javascript, we can use this convention to create variables and function names while we cannot use hyphenated strings to create a variable. In this article, we will explore step by step multiple ... Read More

How to convert Hex to RGBA value using JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 16:56:09

2K+ Views

While designing web pages we use colors to make web pages more appealing and engaging. We commonly use hex code to represent colors but sometimes we need to add transparency to the colors which can be achieved by RGBA values. Hex color values are represented by #RRGGBBAA and The RGBA color values are represented by rgba( red, green, blue, alpha). Here are a few examples of RGBA and hex values − Input: #7F11E0 Output: rgba( 127, 17, 224, 1 ) Input: #1C14B0 Output: rgba( 28, 20, 176, 1 ) In ... Read More

Advertisements