Category "reactjs"

Airtable blocks: Multiple useRecords hooks to different tables force repeated app restarts

My blocks custom app is reading data from multiple Airtable tables, then displays them in context and interconnected. To be able to react to user changes I'm us

Wait for previous dispatch action to complete

const onFeedSubmit = async (data: PostFeedActionProps) => { try { setPostingFeed(true); selectedBusinessList.forEach(business => {

How do i re-run useEffect hook if the localstorage value has been changed?

I'm trying to re-run the useEffect hook based if any new item has been added to the localstorage. My useEffect looks like this : useEffect(() => { //ge

meteor How to use upsert | Exception while simulating the effect of invoking ” TypeError: Cannot read properties of undefined (reading ‘_id’) react.js

I’m having trouble with upsert with meteor.js. I could update questions finely with the below codes but I won’t be able to insert new data. file in

Why onchange, onblur and useRef doesn't work with react hook form?

I tried to use the useRef hook, onChange, and onBlur with react hook form fields. But it doesn't seem to work for a reason. Can someone please explain why it do

CORS problem,using axios,how can this be possible?

I'm using gin to be my backend,and this is my cors middleware code. func Cors() gin.HandlerFunc { return func(ctx *gin.Context) { method := ctx.Requ

Integrate flutter web application into Nextjs web

I am trying to integrate a flutter web app into a Nextjs webpage. I have seen this question but it is not working. I also want to be able to pass a user id or s

Can't export SignIn from "aws-amplify/ui-react"

I am using "aws-amplify/ui-react" withAuthenticator and would like to pass a SignIn component with some custom logic. It is possible to do with "aws-amplify-rea

why am I getting this "Cannot find module server.js"?

I had a Traversy Media tutorial on how to learn the MERN stack that I was following. I had the first part installed on my desktop and it was working properly. o

setState not updating state with multiple varaibles

I am working on one reactjs project. where the user needs to pick two different dates starting date and end date. When a user picks first date i need to update

How to get the current month and the next months until next year in javascript

so I want to get the current month and the next 12 months in vanilla js. For example, upon writing this question it's April 2022, So I want to have this output:

PDF file sent from flask to client is empty when downloaded

I have a flask server that sends a pdf file with the send_file function. When I test this route on postman I can view and download the pdf. However when I try t

Firebase not returning ID in useCollectionData

I'm trying to make a simple firebase to-do app. I can write todos, no problem. However, when I try to delete a todo or mark one as complete, it seems the id is

jest TypeError: Cannot read property 'createRef' of undefined

ImageSlider.tsx const ImageSlider = (props: INF_ImageSlider) => { const [idx, setIdx] = useState(0); const imgRef = React.createRef<HTMLImageEleme

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

I was using qraphql (JavaScript graphql-request library) in a project and ran into a typeError. Here's the code: import { request, gql } from 'graphql-request'

Broken image when site is called from external link

My React app is working well when I call it typing directly in the browser, but when I call it from a link sent by email it shows a broken logo in the header. T

React Image Rendering using require()

I'm trying to render images in react using require(). Below is a snapshot of the code that is working. const ProjectBlock: React.FC<{ data: PROJECTBLOCK }>

Using rgba in box-shadow with styled-components not working

I have this code: const Test = styled.img` width: 48px; height: 48px; border-radius: 50%; box-shadow: 0px 0px 0px 1px rgba(27, 31, 36, 0.15); `;

Migrate CRA project to existing Nx workspace

I have the Nx workspace with React and Express apps created via the official React tutorial from Nx docs. Also, I have an independent CRA project that has just

problem configuring CORSin spring boot and reactjs

After reading all the MDN docs on CORS, I am trying to fetch resources at a spring boot server at localhost:8080 from a ReactJS app at localhost:3000, yet i can