Category "reactjs"

useSelector and map function React Redux

i want to iterate through an array but Im not sure if i can do this in the useSelector redux hook because it's not giving me the result that i want. Have any o

How to put data inside a customize state in for loop in functional component

I get the data from the API as follows: [ { "GroupA1": [ { "code": 10, "name": "item1" }, { "code": 11,

How to return HTML in a Javascript/JSX function return? [closed]

The following snippet will return and ordinal number if I leave the <sup> tags out. But I need them so that I can style it differently t

Update webpack 4 to webpack 5 on an existing create-react-app ejected with react-app-rewired

I have an existing old react application, created with create-react-app and ejected with react-app-rewired. I'm updating the deprecated dependencies. I've alrea

REACT JS - Firebase: Data type NUMBER

Simple and quick question (And yes I google it first, got mislead to phone number verification and other stuff), Anyways! back to the point Why when I input dat

What's the difference between onClick ={ () => function()} and onClick = {function()}?

What's the difference between this code: <button onClick={()=>props.submitHandler(searchInputValue)}>Submit</button> and <button onClick={pro

How do I configure parcel to exit build with an error if eslint does not validate

I'm building a react app with parcel. I have an eslint config set up that I like, and use VSCode tools to catch eslint errors and fix them as I code. The app bu

Incorrect use of ternary operator

I want to display a progress bar and its percentages, but only while bar is less than 100% completed. This is the code I'm using: return ( <>

React useQuery called multiple times when dropdown is opened

I am using "react-query" to call an API from a component . For the purpose of this question , I am returning a mock response from the API . Every time , I open

React Native (0.63) Alert disappear automatically in IOS

I am using RN 0.63 and i am facing issue in React Native core alert.It popup and disappear automatically with second.I want alert should disappear when i click

Adding ", " after each item in a list using React Bootstrap Table

I am having problems properly displaying a list of items that is returned from the API using the react-bootstrap-table library. The returned json is structured

How to mention users using @ in django

I have been working on a project on django and it is very similar to instagram and twitter, one of the functions it needs to have is to mention users using "@"

How to set intellisense for react testing library using typescript

I just downloaded Create-React-App which uses react testing library. I do not get intellisense when I use it's methods (Example : toBeInTheDocument) . How to se

how to deploy frontend(React.js) and backend(Node.js) in a single Heroku app

I have a parent folder named "app" and it has 2 children folders, "frontend" "backend" obviously both have different package.json files. In order to deploy it t

Mui Data Grid - How can I add a Summary row on each page of the grid as a last row which can scroll with other rows

I want to add a summary row to the MUI DataGrid component. I am getting the total from my API response. I want to display this summary row on each page of the g

NextJS Deployment Error : The repository couldn't be found in your linked GitHub account

I am unable to deploy my React NextJS app of vercel. It gives the below error while clicking the deploy button : The repository "NetflixCloneReact" couldn't be

Use access token from first fetch in a second fetch API in React JS

As a newbie to React I have been stuck for awhile on how to get my access token to be put to use in a second fetch API. In the first fetch (Get token), I am abl

Best practice for importing component from components library in React.js

When I create components in React, they're all in a folder called component and each component has a dedicated folder with the same name as the component itself

Upload Image with Axios Post request

I am trying to make a post request to an api to upload a user image and send it to the api for profile settings.But i always receive "the image field is require

Reactjs recorder-js download

I am trying to make a React app for recording voice samples and save them as wav files, I used recorder-js to make the record but I am still struggling to make