Category "reactjs"

why does adding sanity to my react frontend blank the whole localhost:3000 out?

I have my code set up like this with two folders one backend_sanity and the other frontend_react and i can not get the sanity to link to my react front end with

Treating warnings as errors because process.env.CI = true. Failed to compile

I am working on a react-weather application for self learning purpose. Deployed the same in gh-pages. URL https://davisraimon.github.io/react-weather/ Repo ht

Validate form selection option custom input base on product type EDIT

So I think my last question wasn't cleared. Currently I am doing form validation for my project. I have form input with main field of "sku", "name", and "price"

React injecting iframe with max z-index on reload after changes (development)

I have a Create React App with the following .env file: BROWSER=none SKIP_PREFLIGHT_CHECK=true INLINE_RUNTIME_CHUNK=false When I launch the app with yarn start

After adding more products to woocomerce wordpress store graphql fails

anyone knows how to fix this graphql error? It appeared after i've added more woocomerce products. Url seems to be good because after deleting part of the wooco

Yarn - How do I update each dependency in package.json to the latest version?

I have a react app with deprecated dependencies. To make it work, I have to update the dependencies to their newer (but stable) versions. As per this stakoverfl

webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case

im getting the errors: 22 errors have detailed information that is not shown. Failed to compile. webpack < 5 used to include polyfills for node.js core modul

How to render Streamable image on React coming from the FastAPI

I want to render a StreamingResponse image on React from FastAPI. The image is in the form of numpy array which is of cv2 type of object @app.post("/predict") a

Getting VS Code to detect React props properly when Redux state props are mixed in

There is a nice example in the React-Redux documentation on how to build a functional component that will receive both props from Redux and from its parent comp

Import .svg and resize .svg use styled-components in next.js

I am currently trying import .svg into next.js project but I failed. I tried import .svg same way as in react project, that I created typing.d.ts and import svg

Markers not rendering using @react-google-maps/api

I'm relatively new to react world and particularly to using google maps. I'm using @react-google-maps/api and React version 18. I'm trying to display multiple l

Dropdown options not working in React-Bootstrap-Table

I'm trying to implement a dropdown options when clicking on the ellipsis. When I click on the ellipsis button, it will show a dropdown with Edit and maybe other

Avoid rerendering when doing button.click() inside useeffect()

I'm trying to set the data from child component to parent component's state in turn that data will be assigned to input text field. And then I want to automatic

setting defaultChecked in radio button is not working in react

I need to set the defaultChecked on page load which can later be changed by the user <input ref={(element) => (this['input' + item.key] = element)} na

CORS issues with window.open() and OAuth2

I'm running a site that uses SharedArrayBuffer (ffmpeg wasm) which strictly requires CORS (and/or site isolation), AND a Discord oauth2 workflow. After not look

React router routes don't match location

Unsure why this isn't working? Everything has been imported correctly so am unsure why I get the following error message in the console: No routes matched loca

Need do write unit tests with jest for react app, that uses okta, but getting warning

import { SecureRoute, Security, LoginCallback } from '@okta/okta-react'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router-dom

How do I edit an array inside a cell in my React-bootstrap table?

As shown in the link below. I have an array inside a cell, when a click on those cell to edit them, they turns to [object, object] instead of their default valu

Can't change background video on button click

I am trying to change the source url of a video tag when pressing a button, but I don't have any luck. Here is the code: const [bg1, setBg1] = useState(true);

React.js giving TypeError : Cannot read properties of undefined (reading 'length')

<MDBRow className="mt-5"> {tours.length === 0 && ( <MDBTypography className="text-center mb-0" tag="h2"> No T