Category "reactjs"

How Can I Avoid This Warning ' A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from...'?

const AddItem = () => { const [user] = useAuthState(auth); const navigate = useNavigate(); const handleAddCar = (e) => { e.preventDefault()

How to fix my NexJs deployment error on Vercel "No serverless pages were built"

I'm getting this error in my log when I try to deploy on vercel Found next.config.js: /** * @type {import('next').NextConfig} */ const nextConfig = { reactS

" Dependencies installation error" : Is Netlify asking for a previous version of node to deploy the site?

While deploying my app with Netlify I am getting this error Dependencies installation error Is it asking me to install a previous version of node locally and r

How to pass ref to draw control in react-map-gl

Following the Mapbox draw example I can use the draw variable to access all features that are drawn on a map. const draw = new MapboxDraw({ // ... }); map.addC

Material-table export dropdown view broken

I am having trouble with the Material-Table library in a NextJs project. It works fine for the large part except for the export button which displays a very sma

How do I resolve 'Null is not an object' error when evaluating RNRandomBytes.seed

I'm trying to build a mobile application with expo and react-native, I have a screen where I need to generate a passphrase for the user and I'm using react-nati

Snipcart Crawling product failed in a nextjs app

I'm using snipcart in a nextjs with strapi app. I receive an error when processing a payment : A 'cart-confirmation' error occured in Snipcart. Reason: 'produc

React Component SCSS available for all Components

I just started learning ReactJS and I made a Project with .scss For some reason when I add a style in a .scss file that style also changes other components' st

How to store local storage and regular data at the same time in a reducer ( redux-persist)?

I have store.js import {configureStore, combineReducers} from "@reduxjs/toolkit" import { persistStore, persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE,

How to reach multiple elements in an array without using axios

Yesterday i saw a React project on youtube and i wanted to test it myself. This function connects to the link and returns me the questions of the category and d

Can't establish wss connection [React + ASP.NET Core, SignalR + nginx]

I have React app that talks to Asp.Net core API. Both of them are deployed on Docker on my VM. Nginx is installed and configured to resolve domain names for app

How do I update the parent JSON from child

I'm writing a React code in which I need to upload a CSV file, on click of a button, Create a new column, once I update a value there, update the JSON passed fr

How do I make a Navbar with my logo and differentiate with my background color?

In my project I want my navbar to fully stretch to its end and increase its height. This navbar is not full stretched. Also, I want my logo would come before re

React Testing Library gives console error for ReactDOM.render in React 18

After updating to React 18 or creating a new React 18 app from create-react-app, when I run the yarn test command, it gives a console.error as a Warning for eac

How to use Apollo/Graphql hooks within external React.js component library

I have 3 React.js projects and I'm trying to consolidate the reused components across all 3 projects into one shared component library. This component library i

Redirect to 404 page if url is incorrect or if a 404 error is got from BE

I need to redirect to a custom page in case if the entered URl does not exist or in case if I receive a 404 error from BE. To catch the BE error I do a navigati

React onclick pass button api id to state

I have a simple aip with an array with 4 different ids. In react I've made an <ul> with a button for each of the ids. When I click the button, I want to c

How to properly implement useQueries in react-query?

I'm using react-query to make two separate queries in the same React component. I originally tried using two useQuery hooks: export default function Component()

Javascript Filter Method

I am trying to filter an array of objects to display some content and for some reason it does not display anything . App.js <BrowserRouter> <Routes&g

warning from test with jasmine and react testing library

I started a project in react and I implemented some tests (first time I ever did test) using jasmine and react-testing-library (they are not useful for the mome