Category "reactjs"

Add custom style inside DataGrid Toolbar's popup component Material-UI

I'm creating a custom Data Grid Toolbar component by modifying existing Grid Toolbar components from Material-UI. Here is the official example for the Grid Tool

CORS issue fetching data with WPGraphQL and Next.JS

I have created a Next.js app using Wordpress as a CMS and WPGraphQL to fetch data. I have created apollo-client the following way: uri: process.env.NEXT_PUBLI

Use breakpoints in Material-UI Container

I use Container and it needs to be different size for mobile and for desktop. How can I have the Container maxWidth different size based on Breakpoints like thi

Poor next.js image component quality on Google Chrome

I am developing website using next.js framework. I have some problems with Image component in Google Chrome. It loading with poor quality. But when you download

React, Fetch-API, no-cors, opaque response, but still in browser memory

I've been trying to make an React site, which would fetch a GET-response from API and print it out to my .html-file. I've managed to fetch the file just right,

getSession next-auth returns null

I am learning NextAuth, and I am just trying to get my current session in an API. Looks pretty easy from the documentation, but it keeps giving me null. If I us

The prop `children` is marked as required in `AppBar`, but its value is `undefined`

I want to use native Material-ui component but have this error in browser : index.js:2178 Warning: Failed prop type: The prop children is marked as required in

React: How to solve 'Spread types may only be created from object'?

I am trying to create a handler method in React, but I'm getting a typescript error with spread operator. Could someone help with this error please? I did follo

Error: Failed to load parser 'babel-eslint' declared in '.eslintrc': Cannot find module 'babel-eslint' in create-react-app

Trying to install eslint into create-react-app, but get next error when running linter: Here is my .eslintrc config file: { "extends": ["airbnb", "prettie

How to remove in NextJS/React white spaces and non integer charcters when copy pasting a 2fa code inside a texfield input

I have a login that requires a 2FA authentication which is sent by email to the user. The code is long 6 digits. When a user copy-paste the code that appears as

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