Category "reactjs"

How to do nested conditional rendering in React?

A situation I have not ran into before due to way roles/authentication work in a project I am working on. On login, the code returns whether the user is just a

how to fix application error on heroku when i deploy react app along with json-server

I have been trying out json server along with react but for some reason I keep getting application error on Heroku. is it alright to use json-server for testin

How to connect MySQL database to ReactJS app?

I have build a Todo App with create-react-app. The store I'm using is based on Local Storage(JS attribute of object window). Now I created a MySQL databases and

Google Authenticaon in Django and React

Using django-allauth I've enabled google authentication on backend. I can sign in to my Django project and everything. Now, I want to connect that authenticatio

material-ui icon button highlights with an elliptical background when cursor is hovered over it

IconButton in @material-ui/core/IconButton is showing a weird elliptical background when I hover the cursor over it. I thought it is a mistake by me, so I j

ReactJS chrome extension installed but not showing up

Anyone know why the ReactJS Chrome browser extension isn't showing for mein dev tools? It's installed, at one point it was working. I'm using chrome Version 39

How do I change the background color of the body?

I'm using React.js and want to change the background color of the entire page. I can't figure out how to do this. Please help, thank you. Edit (Sep 2 '18): I h

I accidentally designed my webpages on zoom value of 80% on Chrome. How do I modify my CSS to adjust to 100% zoom?

As you can see below, this is how it looked while I was designing the page 80% : After finding out that I was on 80% all along, I had completed 90% of my CSS

What is the best way to manage a user's session in React?

I have a doubt about how to manage a user's session in React, for example in MVC .NET you only just do this using the Session object (e.g. Session["test"] = "";

'$' is not defined no-undef reactjs ajaxcall [duplicate]

I was trying to display json data in a table format based on this answer. Everytime I run this, it shows this error Line 15: '$' is not defin

React.js - Loading Indicator with a delay and anti-flickering

How can I show a loading indicator only when a loading state is true for more than 1s, but when it exceeds 1s and resolves before 2s show loading indicator for

How to stop Editor draftJS cursor jumping to beginning of text while typing in React Hooks?

I have the problem with the drafjs plugin which is Editor, thing is it jumps to the beginning of the text when I am typing in the Editor. I have found How to st

How can I use a function from another file in react?

I would like to create a file (function.js) for a function that does this: let i = 0; if (this === that) { i = 0; } else { i = 1; }

material community icons, setting the size causes android to crash?

I have no idea why setting the size like I am on line 38 is causing the android app to crash. If you take the size away, it works perfectly fine. I have all of

Failed at the [email protected] start script

I am currently facing a deployment issue, can anyone help me with it? Repo: https://github.com/PradhumnaPancholi/Mail-it Error Msg: npm ERR! Failed at the serve

Using Truffle-React + IPFS dependency issue

Hooking up IPFS to my Truffle React project is causing me issues. I'm getting a dependency error (I'm thinking that's what's going on) that I can't find anythi

How to play an mp3 once onClick in react?

i have a that i want to play a very small mp3 once that is in my public folder in my react app, there are so many different solutions to playing audio but none

Could not find a declaration file for module 'react/jsx-runtime'

I am using material-ui in react with typescript template. All of my code is working fine but I am getting this error on multiple lines (not an error warning but

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema

I have this simple helloworld react app created from an online course, however I get this error: Invalid configuration object. Webpack has been initialised

Firestore to query by an array's field value

I'm trying to run a simple query, where I search for a document that contains a value inside an object array. For instance, look at my database structure: I wa