Category "reactjs"

Jest unable to recognize SVG component

Jest is raising this error on one of my components: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/fun

how to know if i should use redux for my application or any other alternative?

I am new to react native and mobile development world. I am developing a mobile application with react native, it's basically an entreprise management app for H

Typescript based React: importScripts() gives: 'importScripts' is not defined no-undef

Following Google Workbox instructions, the first thing I am told I should include in serviceWorker.js is: importScripts('https://storage.googleapis.com/workbox

Problem with scrollIntoView not scrolling until the end on React

I have one component that builds a list of messages for a chat, the scrollIntoView function only works when I open the chat for second time, (the first time, it

Changing DOM while getting result from filter ReactJS

i am working on a search function with states received from input's value , when there is no result i want to change the innerText of my div with an error text

Next.js + Framer Motion scroll progress animation

So I want to create a viewport scroll progress circle with Framer Motion in a Next.js app (using tailwind as CSS). I used the example code from Framer Motion: h

How to change background color in react materialUI card

Hi i want to change background color of card in react materialUI card project. see the attached picture what i am expecting. Screenshot: https://stackblitz

Yarn start not working | error `ERR_PACKAGE_PATH_NOT_EXPORTED'

I have been trying to make this React App, but when I try to do yarn start it shows the following error message: yarn run v1.22.17 $ react-scripts start node:in

React chartjs 2 - Type 'string' is not assignable to type '"timeseries"'

I've been trying to set x-axis as timescale in react-chartjs-2, but can't get past this following error. Chart options code snippet: const options = { plugin

How to change background color in react materialUI card

Hi i want to change background color of card in react materialUI card project. see the attached picture what i am expecting. Screenshot: https://stackblitz

setState inside useEffect doesnt update UI

i am trying to fetch multiple endpoints in UseEffect and depending on it's result show data on the UI (avatar, username, etc.) Problem is, that the data receive

Yarn start not working | error `ERR_PACKAGE_PATH_NOT_EXPORTED'

I have been trying to make this React App, but when I try to do yarn start it shows the following error message: yarn run v1.22.17 $ react-scripts start node:in

Else if statement inside return in React Native

I'm newbie in react-native , and I have a problem with how to make else if inside the return, currently I have error which says, and I want to else if the ScanR

Input from a textfield autofills the other textfields based on data

I have this example data: export const data = [ { state: "state", firstName: "Alex", lastName: "Dhan", country: "US" }, { state: "stat

Promise allSettled is not a function

I planned updating some Promise.all to Promise.allSettled in my React Native - Expo Project but the function does not Exist. i checked all Versions and everythi

Node.js Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0

I'm using Node.js 16.13.1 and created a React application and try used Sass, but when I try to run it, I get this error: Node Sass version 7.0.0 is incompatibl

Trying to use GoogleSignIn in React Native then Possible Unhandled Promise Rejection (id: Error: DEVELOPER_ERROR

I've enabled the Google SignIn on Firebase using this link https://rnfirebase.io/auth/social-auth My App compiles fine but when I press the Login button and sel

I'm getting blank react-app page on using Route

I'm having some kind of trouble when I'm using Router in App.js I'm getting a blank page when I am using, I tried a lot but couldn't found a way to solve the is

How to specify height: fit-content with TailwindCSS?

Using TailwindCSS I'm trying to have a <div> fit to the height of its child, a <button>. My code is as follows: <form className="w-full flex h-96

onLoadEnd is not fired in react-native Image

hi am trying to load an remote image. onLoadStart is hitting but not the onLoadEnd ` <View style={{ paddingTop: 60, paddingBottom: 10 }}>