All Questions
Tagged with reactjs javascript
207,464
questions
0
votes
1
answer
13
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 ...
-1
votes
1
answer
202
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 ...
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
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: &...
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 ...
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 ...
-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. ...
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 ...
-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;
...
0
votes
0
answers
27
views
Change site name [duplicate]
I can’t change the site name, I tried adding a tag
<meta property="og:site_name" content="sitename">
tried schema.org
<head>
<script type="...
1
vote
2
answers
26
views
How to prevent scroll-to-top on certain links in React-Router with a custom ScrollToTop component
I'm using React-Router with a custom ScrollToTop component to reset the scroll position to the top of the page on navigation. However, I have a specific use case where I need the scroll position to ...
0
votes
0
answers
12
views
terser-webpack-plugin and uglifyjs-webpack-plugin
Since webpack 4 is using terser-webpack-plugin by default in production mode or when we specify -p argument which is a shortcut for specifying --optimize-minimize --define process.env.NODE_ENV="...
0
votes
0
answers
12
views
NextJS 14 not consistently loading scripts
On NextJS 14.1.3 I am seeing some strange behavior I do not understand. When I am visiting a page that loads JS from a file the application does not pull the JS every time. Like maybe doesn't load ...
1
vote
3
answers
10k
views
How to render html table in react native?
In my project, I'm fetching a json response from server which is an html content.
I've used react-native-render-html to render the html.But the table contents are not displaying.
Is there any method ...
-1
votes
2
answers
23
views
Passport JS + React application internal 500 errro
I am creating a general chat application with react, and am stuck while trying to authenticate a user. The axios post request raises a 500 error that I cannot track anywhere. When I put in correct ...