Category "reactjs"

React native async storage issues

In my react native app I am trying to save data into my local storage. It works fine most of the time but sometime I get error while setting the item. So here i

react-date-range create custom inputRanges

I'm using the react-date-range component and want to add some of my own custom inputRanges on the left side of the interface. At the moment it has, yesterday, l

Slide effect is not working in react-owl-carousel after adding data dynamically to carousel

I am using react-owl-carousel in my react js project. Initially, I am loading 5 items through an API call and after that, I am doing an API call on the click

How to get URL segment in react.js

I have URL like http://localhost:3000/register. How can I get register segment inside return() in React.js?

react-select How to hide dropdown menu programmatically when 'no results found' is shown?

Github Repo: react-select After searching in the select box: After typing a text that is not in the dropdown and enter is pressed. I want to hide the dropdo

How to get an item from redux store with redux saga

So I have fetched the data from an API and stored it into my Redux store. It's an array of objects, containing 100ish objects. On the front end I am displaying

Typescript error (2345) when pushing element to array of elements(React js)

I'm pretty new to Typescript and I was trying to migrate a component I had on Reactjs to typescript. This component is supposed to receive a number from 0-10 as

ESlint - Error: Must use import to load ES Module

I am currently setting up a boilerplate with React, Typescript, styled components, webpack etc. and I am getting an error when trying to run eslint: Error: Mus

How to change the default screen background color of all the pages in React JS(Next JS) using tailwind CSS

I am trying to change the default screen background colour of all the pages of the web application. Technologies I used: React JS Next JS Tailwind CSS I want to

How to dynamically add a class to manual class names?

I need to add a dynamic class to a list of regular classes, but have no idea how (I'm using babel), something like this: <div className="wrapper searchDiv {

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