Skip to main content

Questions tagged [reactjs]

React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be efficient and flexible.

7 votes
3 answers
10k views

React.js (Vite) application returns 404 on return in monorepository

I have a simple React.js application with wouter-based routing and Vercel deployments that drive me into a little issue where I have no idea about the solution. It always returns 404 after refresh (of ...
0 votes
0 answers
6 views

Docker compose creates Reactjs container, but does not run it

I am new to Docker and am attempting to have a single compose.yaml for my spring-react app. I created individual Dockerfiles for the backend (spring) and frontend (react) using docker init and some ...
0 votes
0 answers
22 views

React component re-rendering issue with redux-toolkit

I created a component const Audit = () => { let auditReducer = useSelector((state: State) => state?.auditReducer); let [isDataGridLoading, setIsDataGridLoading] = useState(true); ...
0 votes
0 answers
5 views

Errors when signing and sending transaction with Ethers

I get the error in the browser console when the function attempt to execute signTransaction, even though the transaction was successfully broadcasted to the blockchain. The loading variable never get ...
0 votes
0 answers
11 views

React doesn't renders its child components during batch state updates with child

React renders its child components when the parent renders. But if a render is triggered in both the components by a state change in the same batch then a render in parent component doesn't trigger a ...
-1 votes
1 answer
201 views

How can I make the URL of my Next.js application not change?

I have been asked that the Next.js project we are currently developing remains with the static URL, regardless of navigation between pages. The client has requested this, and we must do it. Could you ...
0 votes
1 answer
31 views

Does @preact/signals-react work with concurrent mode of React 18?

React 18 enables concurrent mode by default -- at least in the Creact React App generated starter index.js. However, tired with the complexity that comes with a hooks based application design, and the ...
0 votes
1 answer
21 views

Firestore snapshot realtime paging

currently i'm working on a Chat project using ReactJS and Firestore. Let say that i have a subcollection messages which contains multiple docs of message. I have a onSnapshot listener to listen newest ...
0 votes
2 answers
23 views

How to get react installed

Hello I am currently trying to get React library. Node.js is installed on my computer currently. When I enter the code npx create-react-app project-name to get react, it doesn't work. I get the ...
0 votes
0 answers
7 views

react native expo getting error _ExpoSQLiteNext.default.NativeDatabase is not a constructor in SQLite.openDatabaseAsync('db.testDb')

I'm getting below error when I used SQLite.openDatabaseAsync('db.testDb'); Error TypeError: _ExpoSQLiteNext.default.NativeDatabase is not a constructor Code snippets :- import * as SQLite from '...
-1 votes
0 answers
20 views

How to make browse code editor to run React and Tailwind

I am working on a Tailwind playground-like application for my Next.js project. It will simply write React and tailwind components and run it. Does anyone have any idea how to do it? I almost made the ...
1 vote
2 answers
3k views

favicon is not working in next js 13 why?

export const metadata = { title: "Pradeep's Resume", icons: { icon: "/icon.png", }, }; can anyone tell me why this is not working ? I try doing .ico still not working I ...
0 votes
2 answers
25 views

Part of my HTML elements are not being displayed, if I access the webapp from iPhone [closed]

I am a beginner and I am writing a webapp with React JS. For a certain part of my app, I need to dynamically create divs and I came up with this snippet: <div className="flex flex-col items-...
63 votes
17 answers
277k views

Access to fetch at from origin 'http://localhost:3000' has been blocked by CORS policy

Adding to the database shows the error. What should I do? Access to fetch at 'http:xxx' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass ...
1 vote
1 answer
29 views

Unable to access Rest endpoints even after successful login in spring security through react form

I am trying to implement login authentication in spring boot ,I have used Spring security and used a react form in the frontend to authenticate , I am using axios to call my /login which works well, ...
1 vote
2 answers
1k views

woocommerce store api + reactjs - add to cart not working

I have a react app Im working on to create a new frontend for an already live woocommerce site. I'm using this endpoint /wp-json/wc/store/v1/cart/add-item like so - let config = { method: &...
6 votes
2 answers
7k views

EZGrid React DataGrid showing error "Module not found: Error: Can't resolve 'react/jsx-runtime'"?

I'am on React v17 with ruby rails and receive an error like below: Cannot find module '\jsx\node_modules\react\jsx-runtime' imported from \jsx\index.mjs Did you mean to import react/jsx-runtime.j AS ...
0 votes
1 answer
22 views

Keep scroll bar Y position after re-render in react

I tried all other similar questions here but there were about 3 years ago questions and answers which's not working right now. So I have a child component which contains table and in the parent ...
-1 votes
1 answer
23 views

Passing variable from React to CSS - proper formate and usage

I need to pass some data to a component to be used in CSS calculations. These calculations will depend upon breakpoints as well. It isn't working and I believe that the issue is that I don't know ...
40 votes
7 answers
88k views

React-Redux state lost after refresh

I'm really new to React and Redux, I've been following Stephen Grider's Advanced React and Redux course and I'm doing the client side of the authentication. I already have a token saved on my local ...
0 votes
0 answers
9 views

CORS Error Response to preflight request doesn't pass access control check: It does not have HTTP ok status

Hello i've been developing a MERN app, instead of MongoDB is MySQL, so its MySQl ERN app. My site is a simple blog, post blogs with a name, and the content of the blog. So i implemented CORS while ...
0 votes
0 answers
7 views

Can not submit a NEXT.js form that changes some variables in a context file that is exported to another display page

I have 3 main files in my next.js Project. My settings are: no /src, yes App Router, yes Typescript, contains app/ folder. My main goal is to display some values that are updated through a form, in ...
-1 votes
1 answer
35 views

How to submit data split into multiple children components without unnecessary re-renders

The challenge I'm facing in my React project is about submitting data that is split into multiple children. Basically, I'm developing a recipe app, and I have the sub-root component RecipeCreator. ...
0 votes
2 answers
2k views

razorpay order id and razorpay signtaure value is undefined in the payment response

I am getting undefined values of razorpayOrderId and razorpaySignature from the handler response while working on test mode. So the payment verification fails in the backend. I have been stuck at this ...
0 votes
1 answer
18 views

After building ReactTS app some "display: flex" disappears

in my ReactTS app I got some places where my css gets changed after running the command: npm run build I build the app and then deployed it using surge and I notice that in some places it's just gone....
3 votes
10 answers
11k views

Error in React vite project due to rollup dependency (module not found)

I am facing an error in react vite project. snippet from package.json "react": "^18.2.0", "vite": "^5.0.0", "vite-plugin-svgr": "^4.2.0", ...
1 vote
0 answers
58 views

Render Error when using components from @react-three/drei for Android

I am developing an Android app using React and ThreeJS that allows the user to view a 3D object and rotate the camera. Whenever i try using any @react-three/drei components including either one: ...
1 vote
1 answer
10k views

How to test Reac Lazy inside an object

At the project I'm working on, there's a few named exports like the object below: export const object = { component: React.lazy(() => import('some-component')) } (They have more properties but ...
0 votes
0 answers
10 views

Managing Multiple WebSocket Connections in React with Shared Connections for Components Using the Same URL

I'm working on a React application where I need to manage multiple WebSocket connections. Specifically, I want different components to be able to share a connection if they use the same URL. I'm using ...
-1 votes
0 answers
23 views

TypeError: Cannot read properties of undefined (reading 'numberOfCakes')

I am beginner to React and Redux I am trying to learn Redux with React. I have created a store in store.js as below - const redux = require("redux"); const createStore = redux.createStore; ...

15 30 50 per page
1
2 3 4 5
16039