Category "reactjs"

Chakra-UI for windows

Any decent Chakra-UI tutorials for Windows? From setting up react to a full working demo? Can't seem to find any good medium articles on this. The official site

react-beautiful-dnd - Invariant failed: Cannot find droppable entry with id

I was following along with a react-beautiful-dnd tutorial that uses react component classes instead of hooks. I was writing an equivalent program with modern re

Disable Cypress from automatic scrolling

I am testing my application where I have very long side menu and I have a code like that: cy.get('tab').click({force: true}) The automatic scroll happens betwe

Uncaught Invariant Violation: Too many re-renders. React limits the number of renders to prevent an infinite loop

I'm trying to add a snackBar in order to display a message whenever a user signIn or not. SnackBar.jsx: import React from "react"; import PropTypes from "prop-

How to avoid CSS conflicts in ReactJs

I am not at all an expert in react, but from what I could see if I import some css sheets these will be for all my application. If I wanted to use react for a m

movie-trailer npm isn't working properly in my netflix clone project

I've made a netflix clone using React.js, firebase, and have used TMDB api for movie database. I've also used react-youtube and movie-trailer npm. So it has thi

VM892:1 Uncaught SyntaxError: Unexpected token e in JSON at position 0

I'm presently working on a phx / phoenix API written in Elixir. And I have created a frontend for the API using React.js. However, I'm getting the below error

next/image loads very big images

I am using Next js in my project and using next/image for loading images. My page is roughly 1600px wide and has 3 thumbnails per row which are of 500px in widt

Formik onSubmit function is not working on my code

I am creating a form by using react and formik.Below is my code: <div> <Formik initialValues={{ email: "" }} onSubmit={(values: FS

Mui DataTable custom summary footer

Given the follow example: https://codesandbox.io/s/l49mrmvj67 Will it be possible to add a custom footer that will sum the current page Salary column and displa

React js character limitation

Im trying to implement a chartercter limit for a textArea in react js here is my code. state = { chars_left: 140; } handleWordCount = event => { const

Next.js dynamic import with server-side-rendering turned off not working on production build

I'm currently building a site using the leaflet package. This package however needs the window object. That's why I'm importing a component made with leaflet as

How to build a production version of React without minification?

Background I've been following more or less the official guide to setup a local dev environment with react and it seems to use create-react-app, which sets up

How to apply to different bground color for each area in Chart.js

In react-chartjs-2 In Line chart every grid should have different background colors. Is this achievable with this library? This is how LineChart should looks:

react-google-login not calling onSuccess

In the following snippets I'm trying to implement google oauth into my webapp using npm react-google-login. When I try to sign-in, the popup appears, I select o

Why Web3 .GetReserves() is spamming my console?

My code below gets the data correctly; however, there is one problem where when I try to get the reserves of a token. It spams the data over and over again to t

How to upload an image in React JS?

<div className="mb-1"> Image <span className="font-css top">*</span> <div className=""> <input type="file"

Environment variable undefined error in node.js

server.js const express = require('express'); const dotenv = require('dotenv'); const error = require('./middleware/errorMiddlewareHandler'); const usersRo

Updating an object with setState in React

Is it at all possible to update object's properties with setState? Something like: this.state = { jasper: { name: 'jasper', age: 28 }, } I have tried:

How to test for document being undefined with RTL?

I have the following react hook which brings focus to a given ref and on unmount returns the focus to the previously focused element. export default function u