Category "reactjs"

Why is my cors headers not matching even when they are the same?

I am using passport js with REACT and during fetching the logged in user-data the cors header of fetch isnt matching even though they are the same. this is wh

Infinite scroll with React Hooks (setState)

The React app I am doing is to practice fetch from Github's API with React Hooks. Code: https://codesandbox.io/s/lingering-sea-2cdkng When scrolling to the bott

accessing useContext state-variable returns undefined value

I am trying to implement authentication flow where a User can log in and log out. If the user presses a button in LoginScreen, the signIn() function from AuthCo

ERROR in ./node_modules/@chakra-ui/hooks/dist/chakra-ui-hooks.esm.js 238:11-22

I installed chakra-ui via, npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^6 while using ChakraProvider component I'm getting follo

Express Redirect to index.html doesn't render app.js (React Refresh Cannot Get issue)

I'm relatively new to React, but facing an issue which I understand to be fairly common; my app works fine, but when I refresh or try to link directly to a rout

Why doesn't typescript warn about the return type in this function?

For example, I have an onClick handler on a <div> tag. The handler should expect a return type of React.MouseEventHandler<HTMLDivElement> | undefine

React js Compiled with warnings

I am junior backend developer but I use the react library in my clone projects After updating the react script, I started getting a lot of errors in my project.

socket.io doesn't send message back to socket

i'm working on an app which communicate with server via socket.io, users in my app have unique ids which i want to use on my server so i made a small class whic

react three fiber not showing buffer object

i been learning lots about three js with react which use react-three/fiber right now i am learning how to use points to make a simple grid which fill with circl

MUI/Icon makes everything dissapear

When I try to import and use a mui icon in react, it makes the whole div dissapear, and just the background image remain, i have installed: emotion/react, emoti

Ttrying to load a table using react-bootstrap-table

Trying to edit the table cells using react-bootstrap-table, I am able edit successfully, but when I click on other components in the page the edited content has

Auto-scroll in div with React

Having a div with dynamic logs content (props.logs), How can I auto scroll to the bottom? <div className='rc_logsContent' ref={logsRef}> <Collaps

Instead of adding value i'm replacing the value of array

Hi all i'm trying to get an array of Sizes and Color which is inside an object. So when we click on the input a handler will be call i.e., clickHandler() but th

Change Stack Height

I would like to change the height of a modal stack, so you can interact with stacks while still having an overlay modal. --navigator |--any stack |--over

Can't generate base64 string from react signature canvas in react

I am working on a react project for taking a signature from users. I am using react-signature-canvas to sign users. I want the signature data to be saved in th

axios https call now working, why it always takes to https?

i am working on react axios, i run the axios call, you can see i setup the http api call, but when i run the code, it call https api, can anyone please help me

Javascript objects equality vs using the spread operator to create new objects [duplicate]

When I have an object defined as such, const obj = { first: "hey", second: "hello" } and I do not wish to modify this but create a ne

Unit testing useRouter's isReady

I have a component, which takes a parameter from the url and displays it. I implemented it using useRouter's isReady property. Something like this: import { use

How to solve map loop not working to print data ( component ) ? React

I have three componente ComponentFather ( grand Parent component ) ComponentChild ( Child component of ComponentFather) ComponentChildChild ( Child component of

spread operator vs immutable.js

It seems like when using redux with react, immutable.js has become almost a industry standard. My question is, aren't we making changes to our redux states immu