Category "reactjs"

Change the font-size of just one x-axis labels in ApexCharts?

I want to change the font size of just one of the x-axis labels, depending on what day it is (x-axis are days of the week). ApexCharts allows you to customize t

TypeError: TypeError: (0, _reactRedux.useSelector) is not a function

I am working on useSelector of react-redux inside my React Native application, I am getting the following error: TypeError: TypeError: (0, _reactRedux.useSele

React SASS - Error to install SASS Module

I'm trying to use SASS formatting in my React project but it's warning me that some files weren't found, but NPM installed everything automatically, so how can

Why is my React component is rendering twice?

I don't know why my React component is rendering twice. So I am pulling a phone number from params and saving it to state so I can search through Firestore. Eve

How to store dates that will expire in an hour in React?

I have an app with datepicker from antd ui library. The question is about keeping data for an hour after it was chosen with datepicker. Please help me to implem

Trying to remove 'react-hot-loader' from final bundle using webpack ignorePlugin

This is what the react-hot-loader DOCs says: https://www.npmjs.com/package/react-hot-loader Note: You can safely install react-hot-loader as a regular

Warning: Failed prop type: Invalid prop `item.icon` of type `object` supplied to `FuseNavVerticalItem`, expected `string`

I have a project to run a contracting company and in this project I am trying to create a Salaryscale, and I have this file that contains a set of fields But I

how to use map in react to create multiple component?

I have this array that has this structure please check the code down below , my end results should look like the following : veg apple carrot meat chicken steak

Spy on a function inside functional component using React testing library

I'm trying to spy on a function inside a function component using react testing library. I wanted to test whether handleClick function has been called whenever

how to edit and delete in api data table in reactjs

I am new to React. Currently, I am doing API fetch and displaying it in a table and adding edit delete in that table. I am successfully fetching API and I can a

Why Is My Image out of sync with my Text?

I'm attempting to select a random slide from slides on page load, and display it in a hero section of a website. But, the Image keeps getting out of sync with t

Reading multiple objects, in a single object, with in an array, with unique keys. into FlatList

I am trying to display this data in a FlatList. Array [ Object { "-N1gqvHXUi2LLGdtIumv": Object { "Message": "Aeaaeaea", "Message_CreatedAt":

How to test if a component is rendered with the right props when using react-testing-library?

I have some components that are rendering another component (FetchNextPageButton) that is already tested in isolation, like these ones: const News = () => (

How to change PublicPath for Create React App in Dev Environment

I am using Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0-rc1-final which internally uses Create-react-app and AspnetCore.ReactDevelopmentServer My Dev. Envi

How do I get all documents in a Cloud Firestore collection using Version 9 of the Modular Web SDK?

I am trying to get all documents in a collection using version 9 of the Web SDK. But I am getting this error: "TypeError: querySnapshot.map is not a function"

ESLint configuration with typescript jsx

I am having issues with configuration with typescript. Here is my following code in tsconfig.json: { "compilerOptions": { "target": "es5", "lib": [

How to get data from prop.location.state in react?

I try to send data through history push like that. And then I try to get the value of id that I send. The problem is when the first time rendering of compon

Consider using the "jsdom" test environment

I have this simple test: import React from 'react' import { render } from '@testing-library/react' import Button from '.' describe('Button', () => { it('

MUI DatePicker hangs on big date changes

MUI DatePicker (either from Labs or X) was working fine. I cannot work out what happened, but it now hangs if I want to change the date by ten years. It seems l

Adding next and prev buttons using react.js

I succeded to paginate my posts but couldn't add next and prev buttons and make them dynamically using this code snippet: import React from 'react' const Pagi