Category "reactjs"

Jest did not exit one second after the test run has completed

I got the following error by running the test case: Jest did not exit one second after the test run has completed. This usually means that there are async

Functional Component: Write functions inside or outside the component?

I often wrote functional components following a 'Class architecture' where all my function that concern the component are written inside of it like a method in

Plugin "react" was conflicted between "package.json

Every time when i change on JSX. This error throw on my terminal and project UI. Plugin "react" was conflicted between "package.json » eslint-config-reac

How to add X-Frame-Options and Content Security Policy to the React app?

Since I got X-Frame-Options and Content Security Policy as security vulnerabilities. Can someone help me with how to use in react web apps?

How do i use the MS graph api in react?

I'm completely new to JS and React and im trying to upload a file with my MS custom teams app. I've found the information i need to make it work, i just dont un

FlatList moves/drags in all directions

When I click on my FlatList I can drag and move it in all directions (up/down/right left). Although the list appears to be vertical (maybe because of the stylin

How to block negative values in Input tags while entering in forms

I am new to React, In my project I have a form with two Input tags, first Input tag is Room number and second Input tag is Amount, What I am trying to achieve i

How to reduce size on QR code scanner, customize QR code scanner

How can I reduce the size of my QR Code scanner. When I am trying to apply style prop, its not working In below code my scanner is working but it is coming on f

431 - (Request Header Fields Too Large)

First time posting a question please keep it in mind when reading Things i tried: Cleared my google chrome cache and cookies, tried incognito mode, updated my n

Class constructor NodeEnvironment cannot be invoked without ‘new’

At first I encountered this error: https://www.mongodb.com/community/forums/t/typeerror-class-constructor-nodeenvironment-cannot-be-invoked-without-new/151980 P

Infinite loop with a useEffect in React native [duplicate]

I have a problem, on the two functions below, when I check the debug of my request, there is an infinite loop of my GET request and I don't un

Material ui date picker formatting

I want show "Today" text instead of DD/MM/YYYY Eg: when we use datepicker browser show something like 20/1/2009 But I want "Today" instead of that date

Rerender and useDeepCompareEffect don't seem to work together well

The answer to this question may very well be "don't do that", but I'd like to understand the behavior better. I have a simple tree component that I want to rere

React showing a blank screen without any error messages (context api used)

I'm building a react Amazon clone, so in order to give the user the ability to add a product into his basket (as the first version of all the future checkout sy

React suspense/lazy delay?

I am trying to use the new React Lazy and Suspense to create a fallback loading component. This works great, but the fallback is showing only a few ms. Is there

Rails: Webpacker::Manifest::MissingEntryError in Home#index

Webpacker::Manifest::MissingEntryError in Home#index Showing /Users/khalidhosein/Desktop/myEPKmedia/builder/khalid101/app/views/layouts/embedded_app.html.er

Async/Await in fetch() how to handle errors

I have stripe async code in my React app, and trying to add error handling in my code but have no idea how to handle it. i know how to do it with .then() but as

Read-only file system error when try to install pod on macbook m1

I'm trying to install react-native app on ios emulator but i have an error say it have no podlock, so i find solution here No `Podfile' found in the project di

React Native Text style is not working (Icon Badge)

I tried to make a badge icon with red text, but all the styles I applied to the Text didn't work at all IconWithBade.js import React from 'react'; import {Style

Rails: Webpacker::Manifest::MissingEntryError in Home#index

Webpacker::Manifest::MissingEntryError in Home#index Showing /Users/khalidhosein/Desktop/myEPKmedia/builder/khalid101/app/views/layouts/embedded_app.html.er