Category "reactjs"

Disable scroll in View on Expo Web

I am using Expo with react native and just have a plain view with some things inside of it. When I run the code as an expo app on my iPhone the view does not sc

Hot Reload is not working in my React App

I have created this app with npx create-react-app. After this i have deleted all the files except index.js in src folder. Then Hot reload is not working. I have

First Load JS shared by all is rather heavy in next.js

I have a project on Next.js framework and the problem is that First Load JS shared by all pages is rather heavy. I want to know what possible aspects I can tak

I can't setup proxy in mern stack(react-vite) and do not know the reason

I'm developing mern stack web application with react from vite.js and have a problem to deal with proxy. my client side runs at http://localhost:3000 and server

Error while installing node module in ReactJs

I just cloned a React application from Git that doesn't have node_modules on it. I try to install with command npm install but unable to do it. Following error

Error while installing node module in ReactJs

I just cloned a React application from Git that doesn't have node_modules on it. I try to install with command npm install but unable to do it. Following error

Zustand is updating all the components on single property state change

Two different child components using the Zustand store are rendered on every state change. Though the state property they are using in the component is not upda

React Router not working with Github Pages

If you go on my site, https://amodhakal.github.io/portfolio/, then you would realize that that the site is only showing the navbar, not the home page. It only s

How to update a form's input text state immediately in React using setState()

const [text, setText] = useState(''); const handleTextChange = (e) => { setText(e.target.value); } // Inside a form <input onChange={handleTextChange

How to create a new user along with their profile images in Sanity?

Hi I am a beginner to Sanity and I am working on a personal project. All I want to know is how do I add a user along with his profile Image selected as a file f

How to create a new user along with their profile images in Sanity?

Hi I am a beginner to Sanity and I am working on a personal project. All I want to know is how do I add a user along with his profile Image selected as a file f

State Not Updating when Consuming React Custom Hook that Uses Axios with useReducer to Get Async Data

My app returns a "null is not an object" Render Error when consuming the useFetch custom hook that I made to get async data using axios. The status, error, and

YARN warning "has unmet peer dependency". What do with this?

Warning in console: warning "react-scripts > eslint-config-react-app > [email protected]" has unmet peer dependency "@babel/plugin-syntax-flow@

'Component' cannot be used as a JSX component. Nextjs

This is how _app.tsx looks: function MyApp({ Component, pageProps }: AppProps) { return <Component {...pageProps} /> } and I am getting this error whil

React: Updating state when state is an array of objects

I have an array of objects in state: this.state = { items: [ {id: 1, someattr: "a string", anotherattr: ""}, {id: 2, someattr: "another string", anot

Images not loading when deploying to Github pages

I am using create-react-app to develop my react app and deploy it to Github pages. My app works correctly on development. But when I deploy, it successfully dep

React: Updating state when state is an array of objects

I have an array of objects in state: this.state = { items: [ {id: 1, someattr: "a string", anotherattr: ""}, {id: 2, someattr: "another string", anot

NextJs CORS issue

I have a Next.js app hosted on Vercel at www.example.com, which needs to communicate with a backend .NET Core Web API hosted on a different server at api.exampl

Unable to install Recharts using npm

npm install recharts using npm I get the following in my console npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to res

tsc not found in typescript express and react app when deploying to heroku

I am working on an express app(in typescript) and a react app bootstrapped with create-react-app(in js). The directory structure is here. The server directory c