Category "reactjs"

Flask + React App Fails When Deployed to Heroku

I am trying to deploy a simple flask + react project to heroku. I am using gunicorn. The application works when deployed locally but fails on Heroku. The issue

Error: `input` must not start with a slash when using `prefixUrl`

As soon as I update gatsby packages to the latest version, now version 4.10.1, or any version after 4.6, it directly gives me this error without any change in t

Lodash debounce async/await

I'm trying to add debounce to my application before I do an api call. However when I introduce debouce, it seems like my await is ignored and the function calls

Make YouTube video autoplay using React

I am trying to make my video autoplay using react. adding autoplay=1 as a parameter doesn't work. Any suggestions?` Here is my code. <div className="vide

Can't print a dict: Uncaught TypeError: Cannot read properties of undefined

I've this error: crew.js:6 Uncaught TypeError: Cannot read properties of undefined (reading 'first') From an API (I'm using FastAPI for backend) I've this ret

how to redirect from a utility function in remix run

I am using Remix-run and i want to redirect to my login page from a auth utility function. but it doesnt work. here is a similar function to my authentication u

How to automatic load .feature files

Here is an example of the (react) architecture. src/ components/ Input/ Tests/ Input.feature Input.test.js We test with react testing library and

React-hook-form doesn't set isDirty to false when back to initial state

In the official exemple for controlled inputs , if you modify the value of an input and then change it back to its initial value, isDirty will be set to true bu

How react binds events to elements generated by map

When I click discountKeyboard,it reported a mistake: Warning: Functions are not valid as a React child. This may happen if you return a Component instead of f

Formik Validation in a Field Array

I have a formik form like this:- import Drawer from "components/atoms/Drawer"; /* import Input from "components/atoms/Input"; import InputGroup from "component

fetching from an api - state react context

I am working on an app that fetches current weather for a specified location. I want to display current time but i have to use "slice()" method to get rid of th

React Native app Image does not appears in Chrome browser and GitHub link with Network Images on device

I'm trying to figure out with images in React Native <Image source={require('./assets/favicon.png')} /> and Network Images according Docs Static Image R

React: How to Animate Expanding and Collapsing Div When the Size of the Content is Not Knowable

Question: I have a React functional component that recursively renders nested lists. That part is working fine. The part that I am struggling with is getting t

Get an active route with react-router in ReactJs

I am creating a project using reactjs.In my application i am getting the active route using this: this.context.router.isActive but getting undefined, i am us

How to create a new project based on react@17

I have just discovered React. I would like to install the latest stable version of React (17.0.2), but I can't create a new project based on React 17. Can you h

`columns` is marked as required in `ForwardRef(DataGrid)`, but its value is `undefined`

I am having a weird issue with MUI datagrid. Below is the code const mcolumns=[ { field: "firstname", headerName: "Firstname" }, { field: "lastname", he

Pass dynamic value into react-i18next useTranslate

So I have a value I am receiving from an endpoint and I'd like to pass it into my translate command. So this is what I have currently: ${t('translation:user.for

Antd source map not supported in React

I have an issue regarding the integration of Ant Design library in a CRA (create-react-app). After I have tried to integrate it as it is required in their docum

Images are not displaying in webpage grid from uploaded image folder

I'm trying to make a memory match game using reactjs. I have my components and other files in src folder. index.html,style.css and image folder(img, with all im

Export and Import Passport.JS Issues

I am using node js as the backend and react as the frontend. Within the backend, I would like to create a separate file that handles every passport.js module as