Category "reactjs"

How to set default value on language changer to the current locale?

I am having a problem setting the "defaulValue" of a Language selector to display the locale it is in. ** Note: I am using Nextjs and TailwindCSS My code looks

onChange is not working in react functional component while changing the value through state update

I am using mapbox in a project and here I am trying to get the latitude and longitude from the input box. I have set a value in input field and I want to change

getting error while adding css to button in my react js app

I was styling a button in my react js website and got this error while writing the css for it, actually I was going to animate it after hovering the mouse. its

How updated object with child component should reflect on parent component

I want to add the macchines in machine array so I defined a specific component with add function in it. So when I add the "process" in "processes" array then it

I'm unable to load @apollo/client on a React Native Expo app

I'm trying to load @apollo/client on a React Native Expo app. And I get this error: While trying to resolve module @apollo/client from file /Users/andrepena/gi

How to change true to false __N_SSG in nextjs?

How to change pageProps inside of __N_SSG parameter true to false or remove pageProps. Because I generated build time multiple pages. I manual changed true to

How can I hide code from the Edge browser in React?

I have developed a dummy React application using create-react-app. Stackbliz Reference I know that when we do npm run build a build is created and there are map

Accessing a value from a different js file in reactjs

how can I use the variable below theId from file1 in another js file2 in react? file1.js import ..... class File1 extends React.Component { constructor(pr

Why is the package size of NPM run bulid inconsistent with the website (React)

I use NPM run bulid to package the website, and the console displays chunk JS is 1.04MB in size, but when I open ifinder locally, the file size is 3.8m. Why? [p

material-ui dialog causes react-hook-form to change isValid value causing RTL act errors

I am trying to test a dialog with react testing library. This dialog contains a form I render with react hook form. This form has a single field with some valid

Can I find out the color scheme in the browser

since it is possible to find out if the PC is in darkmode or not I would like to know if it is possible to find out which colorschemer the User has taken e.g. y

Error: connect ECONNREFUSED 127.0.0.1:80 if an axios fetch gets initialized outside of a react component react-testing-library/msw

I'm getting the ECONNREFUSED error and it looks like my msw server isn't catching my get request when I start a get outside of a React component (which shaves s

react-dom.development.js:86 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. how can I solved this?

react-dom.development.js:86 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-l

react-dom.development.js:86 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. how can I solved this?

react-dom.development.js:86 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-l

Can't resolve font path using styled-components

I am trying to include a google font Epilogue to my project using @font-face and styled-components. I created GlobalStyle.style.jsat the /src folder and importe

On straching a div open sidenavbar

Hi everyone when I'm using my phone i get to know that there is one feature given by my phone ,they provided a straight line while stretching that div I'm able

Async function passed as prop into React component causing @typescript-eslint/no-misused-promises error

I have the following asynchronous submitNewPatient function which is throwing @typescript-eslint/no-misused-promises error message from elint. Is it possible to

How to Fix Firebase invalid API key

I'm using my API key stored in a .env.local file. And it setup correctly but not working assert.ts:128 Uncaught FirebaseError: Firebase: Error (auth/invalid-api

Having a problem with installing a package on React 18

I tried to install react-neshan-map-leaflet and everything was installed well without errors, After the project started, I saw this error: ERROR in ./node_modul

failed to fetch data from mongodb in dynamic route

I use mongoDB, after run server site 1st time all data load and display in UI. But whenever I try to show dynamic route using an event handler , and this give m