Category "reactjs"

If clause in a React return statement with

So I'm making a React program that's about sports. In there I have a table that shows user inputs and those are saved in Firebase realtime database. I'm getting

Accessor keys not working with space in react-table

Table rows are not able to access the columns in response payload when they have a space in the accessor key. The column displays - on UI. const data =[ {

I am getting an error on login with Auth0 and NextJs

I have tried a serverless auth0 with NextJs/React example that is identical on 2 different sites. I am getting an error when I click login and I can't understan

How to handle components with different routes in react js

I have build an react app with 3pages Page1,Page2,Page3 and have Navbar and Sidebar component. And using react-router v6 for rendering components. I want the Na

Installing Firebase tools: Stuck at downloading Chromium

I am trying to run in the terminal of the vs code since I plan to host this online already: npm install -g firebase-tools But it is stuck here: This is my pac

Sum array of objects value based on month - ReactJS

So first of all, because I am using a ChartJS I need to generate an array of months. The creation is looking like this : const [generatedMonths, setGeneratedMon

React - Property 'data' does not exist on type 'IntrinsicAttributes & InfoGridProps'

I have a demo here I'm just trying to create a simple app where I pass data to a component and then display that data So I have the data which is an array of ob

TypeError: _client_js__WEBPACK_IMPORTED_MODULE_2___default.a.fetch is not a function. How to solve this problem?

I was using react hooks face this error blew. import React, {useState, useEffect} from 'react'; import sanityClient from '../client.js' export default function

Change Button Text in loop using React

Is it possible to change button text that is created using array. If it is possible, what should I do with the onClick function in the button. Here is the sampl

Should I use Redux or Redux-Toolkit? [closed]

I am new in studying Redux. Then I know the existence about Redux-toolkit. My question is which should I use? Can Redux-toolkit replace Redux

can not get input value using useRef in react hook form

I am using react hook form to make a login form .I am trying get the input value of email, after i click on reset button. so i used useRef. But useRef is not se

How to target a styled component inside another styled component?

Instead of using div:first-child or div:nth-of-type(2) I would like to say Row or ColSm3 like we usually do in normal CSS, Is it possible to target a styled com

React, cart with context and localstorage

I have a demo here It's a cart with products that can be added to a cart and show a total. I'm using context for the state as the products and cart are differen

Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths

I upgraded React v16.14 app to run with Webpack v5 from v4. I'm seeing hundreds of warnings with .scss files like below even though the app seems to run fine. I

How to set a background image for all pages in reactjs

I tried to set a image to all pages as background. I have tried to set the style of the body tag of index.html <body style="background-image: url(%PUBLIC_URL

error network while installing create-react-app

i've tried many times when installing create react app but it always error connection, but my internet connection is really stable npx create-react-app my-app

React Typescript: Type issue when passing multiple refs to child component

I have a main component that passes down multiple refs to Panels component like so import { useRef } from 'react'; import Panels from './Panels'; export const

Storybook-tailwind. How should I add tailwind to storybook

I want to add tailwind to storybook. So that Stories will render just like it will render on web. I used create-react-app project-name --template typescript to

React craco build fails on dokku: Could not find a required file. Name: index.html

I try to deploy my react app (craco) on dokku and I get this strange error on build: remote: -----> Build remote: Running build remote: remote:

How to get value from TextInput and set it with Button React Native?

I want to assign the username I get from a TextInput to a username variable via a button and output it in the text below. Meaning, if the user enters the userna