Category "reactjs"

ReactJS: what is the difference between functional component and class component

Could anyone can explain in detail the difference between functional component and class component in ReactJS? When we use a functional component and when we u

React, use JSON as env

I have a shared JSON on vault for a React app like this one: { "REACT_APP_SOME_ENV": "some value", "REACT_APP_SOME_ENV2": "some value2", } How could I

Modify Redux Persist settings after applied to store?

There are any way to modify settings on redux-persist after applied to store? or this can be only defined at bootstrap of application?

How to add custom webpack config with ionic v4 and react?

I have set up a project using ionic framework v4 with React and wish to add a webpack loader to allow importing graphql queries from .graphql files, as describe

background-image URL not loading using Webpack

Basically I am trying to have an image display in the background of a container, but it isn't loading. I have tried various paths as it isn't entirely clear to

Invalid suspense option usage in next/dynamic

I have a loader component and I want it to appear while my page is rendering. According to the docs, when using suspense my code should look like this const Dyn

React/Redux Testing - Could not find "store" in either the context or props

I'm new to react/redux and just getting into testing my first app with chai. I'm using redux-form/immutable and react-router, and I'm not sure how to resolve th

Having a trouble with Google OAuth2. Can't sign up with google

Been facing this issue "You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New

MUI next Tooltip does not show on hover

I use Material-UIv1.0.0-beta.34 Tooltip with Checkbox and FormControlLabel, actually when I hover to the label on Checkbox in one case the tooltip shows as expe

How to fix NextJS webpack error: You may need an appropriate loader to handle this file type, currently no loaders are configured

I generated NextJS project using TypeScript template and I want to add my Storybook to the project. Storybook is written in TypeScript. When I'm adding Storyboo

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