Found 198 Articles for React JS

HTTP REST API calls in ElectronJS

Shubham Vora
Updated on 28-Feb-2023 17:09:03

4K+ Views

We can choose from various libraries like request, axios, or fetch to make requests to our HTTP REST API endpoint. Doing so allows us to interact with data from our API and display it in our ElectronJS application. ElectronJS is an open-source project actively maintained by the OpenJS Foundation and a community of contributors. With ElectronJS, we can build cross-platform desktop applications using web technologies such as HTML, JavaScript, and CSS. In this tutorial, we will learn how to use HTTP REST API calls in our ElectronJS application. Steps to use HTTP REST API calls in ElectronJS ... Read More

How to set an object key inside a state object in React Hooks?

Shubham Vora
Updated on 28-Feb-2023 17:08:03

7K+ Views

The React component can contain various states, and we can use state variables inside the return statement with HTML elements. Whenever the value of state variables updates, it also updates on the web page without refreshing the web page. This tutorial will teach us to use the objects inside the state variable. Whatever value like number, string, Boolean, or object we want to store in the state variable, we need to pass it as a parameter of the useState() hook. Use the objects in the React hooks This section will teach us to use an object as a ... Read More

How to set a background Image With React Inline Styles?

Shubham Vora
Updated on 28-Feb-2023 17:06:52

18K+ Views

In ReactJS, we can use the ‘backgroundImage’ property of CSS to set the background image for a component or particular HTML element like div. Here, we will learn to set the background image using the inline styles. Also, we will use the absolute and relative URLs to set the background image. Syntax Users can follow the syntax below to use the React inline styles to set the background image. Div content In the above syntax, we have used the ‘backgroundImage’ CSS property to set the background image for the div element. ... Read More

How to use Flexbox in React Native?

Shubham Vora
Updated on 28-Feb-2023 17:04:00

1K+ Views

Flexbox is a one-dimensional layout system used in React Native for arranging and aligning items in rows or columns, similar to how it's used in CSS on the web, but with some default differences. It is designed to help us create layouts that look good on different screen sizes. Using flexbox in React Native is like arranging objects on a shelf by placing books, pictures, and other items in different positions and orientations. This allows us to create responsive, flexible layouts that adapt to different screen sizes and orientations. In this tutorial, we will go through the basics of ... Read More

How to show LinearProgress in ReactJS?

Shubham Vora
Updated on 28-Feb-2023 16:43:39

2K+ Views

The linear progress bar is often used to show download and upload percentages in the application. We can show the upload or downloaded completion percentage using the linear progress bar. Also, it improves the UX of the application as it shows progress with animation. In this tutorial, we will learn to show linear progress using the Material UI progress bar and custom progress bar. Use the Material UI to show the LinearProgress bar in ReactJS Users can use the below command in the React application to install the Material UI library. npm install @mui/material @emotion/react @emotion/styled ... Read More

How to use the handleChange() function in react component?

Shubham Vora
Updated on 27-Feb-2023 12:17:09

5K+ Views

The handleChange() is not a built-in function in the React, but as its name suggests, we can define it to handle changes that users made in the input. In the react, we need to handle the input whenever a user enters some value in the input field to make it editable. Here, we will learn to use the handleChange() function with single and multiple inputs. Use the handleChange() function with functional components In react, we can define the components using the function keyword and call them functional components. We can use hooks to manage the input value while using the ... Read More

How to use AppBar Component in Material UI?

Shubham Vora
Updated on 27-Feb-2023 12:16:00

2K+ Views

The Material UI is a library containing various components with different styles and responsive designs. For example, Material UI contains an AppBar component, which we can directly import into the React component and use as a child component of other components. Also, the Material UI library contains different components like buttons, links, tab bars, pagination etc. Furthermore, we can manipulate every component by passing a prop while using the component. For example, we can make an AppBar responsive by passing the respected props. This tutorial will teach us to use the AppBar component in Material UI. Users should install the ... Read More

How to set Parent State from Children Component in ReactJS?

Shubham Vora
Updated on 26-Oct-2023 02:29:41

30K+ Views

In ReactJS, we can set the state in the child component by passing the values as a prop of the child component. Sometimes, we require to set the state from the children component to the parent component in ReactJS. We can create a state handler function in the parent component and pass it as a prop of the child component. After that, we can use the child component function to set the parent component's state. In such a way, we can manage the state of the parent component from the child component. Set parent state from children component in functional ... Read More

How to set focus on an input field after rendering in ReactJS?

Shubham Vora
Updated on 27-Feb-2023 12:07:59

8K+ Views

While working with the forms in React, sometimes we may require to focus on any input. For example, we want to enable the submit button only if the user enters some text in the input field. In such cases, we can focus on the input so that users know that they have to enter some text in the input field to enable the button. In this tutorial, we will learn multiple ways to focus on the input field after rendering in ReactJS. Use the autoFocus attribute with the input field We can use the autofocus attribute in HTML to focus ... Read More

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

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 may require to send data to the backend to store it in the database. For example, we have taken the user’s profile image and need to send it to the backend to store it in the database. In many cases, we require to send single or multiple files to ... Read More

Previous 1 ... 5 6 7 8 9 ... 20 Next
Advertisements