Category "reactjs"

Pass dynamic value into react-i18next useTranslate

So I have a value I am receiving from an endpoint and I'd like to pass it into my translate command. So this is what I have currently: ${t('translation:user.for

Antd source map not supported in React

I have an issue regarding the integration of Ant Design library in a CRA (create-react-app). After I have tried to integrate it as it is required in their docum

Images are not displaying in webpage grid from uploaded image folder

I'm trying to make a memory match game using reactjs. I have my components and other files in src folder. index.html,style.css and image folder(img, with all im

Export and Import Passport.JS Issues

I am using node js as the backend and react as the frontend. Within the backend, I would like to create a separate file that handles every passport.js module as

401 unauthorized browser alert after fetch call with bearer token in react

I have a get fetch request with header having Bearer token, getting 401 unauthorized error, even if the response status condition checked in the then statement,

Module.css not loading styles NEXT js

I'm trying apply module.css to one of my components according to this guide https://nextjs.org/learn/basics/assets-metadata-css/layout-component. /*/components/

Icon should have `type` prop or `component` prop or `children`?

Warning: Icon should have `type` prop or `component` prop or `children`. How to troubleshoot the issue? import React from 'react'; import { bindActionC

Only allow specific components as children in React and Typescript

I would like to only allow specific components as children. For example, let's say I have a Menu component, that should only contain MenuItem as children, like

React - component doesn't re-render after delete request

I have problem that after deleting element from my list, component doesn't want to re-render. When I go through routing to some subpage and then back, item is a

fetch API always returns {"_U": 0, "_V": 0, "_W": null, "_X": null}

The below code always return the below wired object {"_U": 0, "_V": 0, "_W": null, "_X": null} as response. Here is my code getData = () => { f

jss how to change opacity for a color

Currently I am using the following code to add a color to an element using jss. const styleSheet = theme => ({ root: { backgroundColor: theme.c

how to get data with nodejs in webscraping

I am trying to scrape this link but I get the data from main tab and I don't know how to solve this problem I tried this with python , nodejs but both have the

react-scripts: not found when building docker image in CI, but works locally

I have a Dockerfile to build a React app and copy the build to an Nginx container. FROM node:14-buster-slim AS node-base FROM node-base as deps WORKDIR /app C

REACT: How can I download existing PDF files from my project folder?

I have tried it like so: <a href="./cv.pdf" download > download </a> That's what I have in this case Can someone help with the solution?

React JS - MUI How to fix problem with expand/collapse and open drawer

I have 2 problems in the code that I can't solve. The first is the opening sidebar menu. The menu opens but does not close. It should close either with a click

Iterate over children, find last element

I work on breadcrumb component and I iterate over children like: renderChildren = () => { const { children, divider } = this.props; return ( React.C

Material UI Select component crashing React application

I'm trying to add a material ui select component to the React application I'm working with. When I try to add a select functionality to a form, it crashes. Desp

React / React-DOM package dependency conflict

I've been running into this error message every time I try to run npm update: : npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm E

The user aborted a request - ReactJS

I got an issue on my javascript program my project separate to 2 files: backend -> NodeJS (work fine I check the routes using POSTMAN and I got the Data. fro

Passing state to another component

In my MUI Table I navigate the user to another page when is clicked over the row. Is there a option to pass the data from the row directly with useNavigate, ins