Category "reactjs"

How to run nextjs dev server with the config from another project?

I develop a nextjs application. Inside the root folder, I've made landing/pages/ folder and I want to run dev server with those pages using next dev ./landing.

Cancelling Axios request in React when using React Router Switch

I'm a newbie building an App that utilizes React Router to switch between 3 different components that each utilize Axios to fetch data from an API. I am trying

React, Next.js and Type Script Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'value')

I am developing a multi-page form using antd package to add some style In the main page of the form, I wrote the following code (I imported everything that I ne

material ui usestyles deprecated - do i need to change code

I'm a bit confused on material ui v5.5.2 on how to useStyles(). This website says deprecated but if so how do you still use this? https://mui.com/styles/basics

Custom react-admin drag & drop list

It can't drag. What is wrong with it? I'm using react-sortable-hoc with material-ui to custom react-admin list page with drag & drop sortable. Demo : https:

How to Check if Service worker already exists and update with workbox

Would like to see if we can detect if there's already an active service worker on the client's device. Currently I use getRegistration to do this but I was curi

Import "rest_framework" could not be resolved. But I have installed djangorestframework, I don't know what is going wrong

Here's my settings.py: INSTALLED_APPS = [ 'rest_framework', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'd

Material-ui when closing the dialog it wont let me touch my page

So after i close the dialog box of material-ui, somehow i can't click or touch anything in my page useState: const [open, setOpen] = useState(false); Function:

Warning message "DeprecationWarning: Invalid 'main' field in ....." after typing amplify

When I write amplify console in react-app, this warning message is coming. >amplify console (node:2500) [DEP0128] DeprecationWarning: Invalid 'main'

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