Category "reactjs"

Unable to use Ckeditor in React Typescript

'CKEditor' is declared but its value is never read.ts(6133) Could not find a declaration file for module '@ckeditor/ckeditor5-react'. '/ProjectNameUnknown/node

Replace `process.env.XXX` with environment variables

I am building a React app where I need to use environment variables set in .env within javascript files hosted under the public folder (e.g. /public/sw.js). Ide

MUI DataGrid onCellEditStop returns old value

I am trying to use an editing API from "@mui/x-data-grid" and simply have editing on the cell and retrieve the new value. When I use onCellEditStop={(params: Gr

how to pass outlet context to nested route in react router v6

I am using react router dom v6 how can I access the context in a nested route in the second child <Routes> <Route element={<Parent/>}>

How to convert city name to coordinates in JS?

Is there a way to convert city name into coordinates? Openweather api provides access to historical data but i need to have "lat" and "lon" coordinates instead

Accessing previous state within a useDispatch method

How do I access previous state inside the callback function in react? Because once I access data it is always returning an initial state version, since I use us

How to test a DatePicker component using Jest?

Here is the component to test, its a DatePicker component: import { useState } from 'react'; import { useFormContext } from '../Form'; import Textbox from '../T

How to use same enum in multiple files in Typescript without import

I've been struggling with this now longer than I should and surprisingly, the existing questions (and there are many) don't really help further. My goal is to d

Take function from one file to another (React)

So I'm struggling to pass "polygonNFTs" to another file. I need to find its number to decide give user permission or not. its working in index but not in navbar

Conditional render + add some extra code in React

I'm aware of some of the conditional rendering methods for React components. Some of them can be found here. Using ternary operatiors, if...elses.... But I want

Nginx Reverse Proxy Failure in Docker Container

I am new to Docker and nginx and am in the process of setting up a reverse proxy with nginx for my react web application. I am using Docker to contain the appli

React useCallback() not working as expected

I'm trying to understand useCallback() a bit better by creating a simple React app and playing around with it. I tried wrapping handleClick function in useCallb

React Native update component

I'm pretty new to react-native. When I click the stop sleep or info button I send patch requests to the users.json file to change the status. My JSON file conta

Convert a string to number with parseInt does not work as expected [duplicate]

A quick maybe simple question : We are trying to parse a string into number , the sample number is "1928433000460244141" so when we try to par

Sequelize: find count of 3 level associated model entries

I have a products database structure as follows: Categories > Sub categories > Child categories > Products the respective table names in mySql database

How to test a function inside useEffect with Jest and Enzyme?

I am testing my components using jest and enzyme. I want to load my component when the whole page is loaded so I am using load event inside useEffect, here is m

How to make this CARD/CHART Component with Next.js and Apexchart

I know this questions it's kind of too open, but I'm need some guidelines in how to do something like this... That's a card 200x200 with that information. The

How to reduce the Gap space

in below grid container , there is an image on the left , with a bunch of text on the right , there is a huge gap between the image and the text which tried to

Jest Memory Leak when running test cases on redux connected components

When I run my jest tests, I got the following error , this particularly happens with the redux connected components and forwardRef:true is one parameters of the

Dropdowns and filters not applied with REACT

I'm not able to display my menus (_ids.name) that match my filters from the 2 dropdowns (MyNorm1,...MyNorm6) and (Classification1,...Classification6). For examp