Category "reactjs"

React toggle theme and save it to localStorage and also toggling classes to the html body tag

Please take a look at my code the toggle button is working completely fine but I also want to save the toggle state to localStorage I have tried it so many time

Creating a createSelector in Redux that does not rerender unrelated components

I have a simple document maker that allows users the create multiple fields of two types (input field and label field). They can also rearrange the field via dr

How to a drop down-down menu list

I am trying to do a dropdown menu in javascript where get all states from a function and show in the drop down menu. But the code that I have so far is showing

The id provided does not exist razorpay error in react native

While creating order_id by using razorpay API of orders the order id gets generated. But when I pass the value of order id in checkout, it throws me the error a

How do I call useQuery in a map function?

I have the below react component which is removing products from a mongodb collection based on the items in the cart. I get this error when I run the code: Comp

Multer super slow upload after recieving post request with images

Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p

How to extract selectors from adapter from queries with arguments

I'm trying to extract selectors from queries in my apiSlice as said in this documentation: https://redux.js.org/tutorials/essentials/part-8-rtk-query-advanced T

Multer super slow upload after recieving post request with images

Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p

MapBoxGL, multiple layers performance issue

Premise: I have a set of data (stops on the map)loaded via geoJSON in a clustered source, each of these stop locations can have a different icon. I have over 14

Force a component property to be an h2

I'm trying to define a props interface for a component using Typescript which requires the value passed for that property to be an instance of <h2>-<h6

React page gives back 404 page after refresh

I have a decentralized app with a React frontend. If I go to the homepage (https://app.valerianprotocol.com/), everything works fine and I can refresh the page

reactjs deployed on Azure-Static-web can't download blob

I have a Static web app in Azure. It's written with Reactjs and I want to download the response of calling an API. return new Promise((resolve, reject) => {

Build a CRUD App with React Hooks and the Context API

I want to build a CRUD App with React Hooks and the Context API. my problem is in the EditUser component. when I click on edit button to edit user it doesn't sh

How to handle map product not found in react dropdown

I would like to handle unmatch result in the code highlighted in bold below. Currently, it will use GraphAPI to get the information from AzureAD. if product mat

ReactJs Routing Issue on Github Pages URL

I have a problem with REACTJS routing when I deployed my webpage in Github, I don't know why the routing leading to the Error Page. (this is the default URL in

Omit specific prop from an emotion styled component?

I have a BoxWithAs component, defined something like this: const BoxWithAs = styled.div( { WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'g

Cloudinary Widget is populating twice in my app

I'm using Cloudinary as an image hosting DB for my application. I'm trying to call the widget, whenever I toggle the submit for my ORM function. The call is wor

why im getting this error Elements in iteration expect to have 'v-bind:key' directives

my code works perfectly but i still didnt manage to find out why am i getting this error message i looked it up and it seems that im missing. And another proble

react native expo webview crash application when open pdf uri android

Try to preview a file(pdf,word,doc),once select from document picker? using webview, but it crash the application in android How to read and preview file uri fr

Jest tests breaks when calling getState outside a component in React

A bunch of my tests suddenly started breaking when I use store.getState() inside a function in React. If I log the store, the store exists but it is still break