Category "reactjs"

MUI Nav Tabs does not work with react-router

Here are the four components: App.js: import React from 'react'; import { Route, Switch } from 'react-router-dom'; import About from './About'; import Home from

Display an image from an api for 24 hours

I'm doing a project in React, and on my "Home.js" page I would like to display a pokemon randomly for 24 hours thanks to the PokeApi (https://pokeapi.co/). But

how to create a automatically scrolling table in react?

How would I go about creating a automatically scrolling table that takes api data in react? specifically, what would I use to make the rows of the table automa

I got this issue when, I am trying to run this code (gapi.auth2.getAuthInstance().signIn();) "idpiframe_initialization_failed"

error: 'idpiframe_initialization_failed', details: 'You have created a new client application that use…i/web/guides/gis-migration) for more information.'

Why does my React Router return blank pages?

I am using the latest version of create-react-app. I have searched all tutorials and tried a few websites with different tutorials but I am not getting errors.

Using Firebase Auth & gAPI?

How do I get Firebase Auth to work with Google drive api? Using react, I have firebase auth working and google drive (gapi) both working individually but am str

In Material UI v3.6.0 Select Dropdown div flickers / triggers twice

When i am providing less than 100 items to the Select Dropdown its working fine but if i provide more than 100 then the Dropdown flickers/triggers twice. I have

How to test Material ui's DatePicker with Jest and Enzyme

i've got a problem. I'm trying to test material ui's datePicker (https://mui.com/api/date-picker/) with Jest and Enzyme. I've searched alot but couldnt find any

How to add custom arrow buttons to Alice-Carousel?

I am making a carousel component with alice-carousel (https://github.com/maxmarinich/react-alice-carousel/blob/master/README.md) but having trouble customising

Error: Cannot find module 'gatsby-plugin-utils/polyfill-remote-file'

Can't run the Gatsby application in a development server. Attempted solutions: attempted to install polyfill-remote-file but the module doesn't even exist updat

How to create a link in React component with onClick handler?

What is proper / standard way how to create link with onClick callback function without URL? <a href="#" onClick={this.handleClick}>click me!</a>

How test a component using the useReducer hook?

Reducer // src/reducers/FooReducer.js export function FooReducer(state, action) { switch (action.type) { case 'update': { return action.newState;

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