Category "reactjs"

npm ci passing locally but failed on gitlab

Getting this error during npm ci command, but it is working fine locally (tried removing node_modules and running npm ci to reinstall it, no errors) $ npm ci np

HERE REST API - React/Typescript - OAuth Signature mismatch

I am trying to implement the OAuth authentication for HERE REST API following this documentation: https://developer.here.com/documentation/identity-access-manag

How can I get my Modal in Leaflet to appear in front of the map?

I am using leaflet to display a map of Jamaica which should prompt a modal to pop up once the user clicks on one of the parishes (states). Currently the modal a

Getting error when submitting multiple file attachments to list item using sp/pnp latest version

I'm using sp/pnp to submit a list item with multiple attachments: export const CreateListItem = async (listName: string, item: any, files: File[]) => { c

Problem with emitting a list of rooms in Socket io

First of all, I'm very new to socket.io, so if someone would lend a helping hand it would mean a lot! :) I am making a simple chat app were a user can create or

How do I attach an event listener to the "max" Avatar in Mui's AvatarGroup?

I am trying to attach an event listener to the "max" Avatar specifically in the AvatarGroup, I know I can style the element but don't have access to the element

React Components Rendering Error in Electron-React-Boilerplate

Good Afternoon all, I built a React.js web music-player application a while ago, and now I am transforming my old react application into a downloadable des

Cannot animate nested routes (outlet) only in React Router Dom v6

I have a project with a few pages that are rendered within a layout with a sidebar and a topbar: <AnimatePresence exitBeforeEnter> <Routes location=

How can I get Api data in a Component and use the data I get in another?

This is where I would like to "stock" my API data. It's a component named api.js import axios from "axios"; function Api() { const options = { metho

Warning "Each child in a list should have a unique "key" prop' even with the key present (React + Material UI)

I am trying to fetch data from a JSON file using map function, but I keep getting this error 'Each child in a list should have a unique "key" prop' even though

Exposing error messages from Auth.forgotPassword and other Auth methods

Is there a way to see all available error messages that are returned from the @aws-amplify/auth Auth methods? When calling Auth.forgotPassword with the correct

Ensure that there is only one instance of "graphql" in the node_modules directory

While trying to download the schema using npm run schema:download I am receiving the following error. [email protected] schema:download npx apollo service:download

Unable to map nested array data in JavaScript?

Here, I have nested array object categories which have nested array objectproduct. product contains name, price, discount, unitsold properties with images array

Can't insert an array of data into Formik state. One element is set only

I try to add an array of files into "files" property in Formik state, Formik state: initialValues={{ firstName: '', last

Error: Absolute route path "/" nested under path "/app" is not valid

I suddenly get this error and not sure why. I did not change the "react-router-dom": "^6.0.0-beta.4" version. But the "react-dom": "^16.8.4"" vad changed to "re

Failed to minify the code from @mui, while npm run build

I have an app using npx create-react-app name. While trying to build my app using npm run build, it was interrupted with the following error. Failed to minify t

Setting state in React useEffect hook

In my app I fetch data from my API after a button is clicked that changes the state of endpoint. Until the data is fetched I want to display a loading icon. Aft

CRA - window object is undefined - jest/react

I have an issue in my tests that flag up a window variable as undefined. But I don't know where in the setupTests.tsx, I would need to define it. So far the var

Type '{ name: string; }' is not assignable to type 'ReactNode'

I want to render names that are in the State. But I get this error: Type '{ name: string; }' is not assignable to type 'ReactNode'. I understand that ReactNode

How can I call Rtk Query Hook when the condition changes?

I created the endpoint with createApi: export const postsApi = createApi({ reducerPath: 'postsApi', baseQuery: fetchBaseQuery({baseUrl: 'https://jsonplaceho