Category "reactjs"

ReactJS/Springboot- Blocked by CORS policy: No 'Access-Control-Allow-Origin'

I am working on a project with Springboot ReactJS and MongoDB. I have implemented the whole code but it doesn't import data from the database. It shows the belo

Typescript interface for a nested array of objects

I'm new to Typescript and I have to build an interface for the following props type: const myProps = [ { name: 'name1', on: true, children: [

Why use useState over this.state?

I have been learning React hooks lately and I am currently facing useState. I know this is a way to use state in functional components but I wonder what the rea

React causing: Can't perform a React state update on an unmounted component

My situation: After login I try to get username and save it to redux store after this redirect from login to home page(in this page I display list of tasks) and

How do I get smooth scroll and scroll snap to work together in React while also persisting user scroll position on refresh?

I have a custom hook that persists the user's scroll position on page refresh. I also want to implement smooth scrolling for my navigation links (site is a sing

Deploying Reactjs website on github pages with routing results in 404 error on refresh

I've created a ReactJS webpage with multiple routes using BrowserRouter and deployed in via GitHub pages with its own domain. The website works perfectly as int

How to use delete request with axios in react project and Firebase?

I need to delete the element but don't know how to get that specific element! This is the structure of data on Firebase And this is the code: import React, {us

How to use React Keycloak?

Did according to examples, but I get an error: http://localhost:3000/#error=login_required&state=19004288-e312-4782-ac23-9dc038cd7bb0 Here is my code: keyc

How to make react table to scrollable?

I am trying to make react table scrollable horizontally and vertically but right now it is taking all the space according to the data. I want to make this table

Uncaught TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy')

I am trying to test a react typescript project using jest but it's giving a confusing error: Error image Here is my package.json: "dependencies": { "@testin

MaterialUI Appbar with Tabs - can it be scrollable AND fullwidth

I would like my tab buttons to spread out across the entire screen. When the screen width is too skinny to fit all the tabs, I would like the scroll buttons to

How best to create custom styled components in MUI

seemingly simple problem: Example Background: we have many lists of items and render them in the UI with <List>. Example Problem: we usually (but not alwa

How to create multiple swiper instance in a react component and control one with the swipe of another?

I have a react component where I need to have multiple carousels that are connected. I am trying to create two swiper instance in a react component and control

Cannot read properties of undefined (reading '0')

I have a page coded in React with NextJS hooks, when I try to render a page the error says what's in the title, I presume because the object which I'm mapping i

MUI Datagrid duplicate row and data

I want to know if there is a way to duplicate the specific row with data on it using material-ui Data Grid? I hope someone could help me. Thanks in advances! Bt

Composition In React with params

I am trying to create an architecture that in some way imitates the slots from VUE. The idea is for the parent component to be able to inject some props into th

Where can I write server code for stripe payment in Django project?

I am working on React JS to implement stripe payment gateway. I am using Django as a backend Server. In stripe documentation. https://stripe.com/docs/checkout/i

How to redirect in React Router v6?

I am trying to upgrade to React Router v6 (react-router-dom 6.0.1). Here is my updated code: import { BrowserRouter, Navigate, Route, Routes } from 'react-route

Async/Await not executing as expected

I have the below method where I am updating store and after store updating, I am performing certain activities based on store values - useEffect(()=>{ const

React attrs method Typescript

I am getting following warning. I am using typescript. "Over 200 classes were generated for component styled.div with the id of "sc-dkzDqf". Consider using the