Category "reactjs"

Hydration error due to if statement in Next.js [duplicate]

I am getting three errors due to the if statement in my _app.js file. Error: Hydration failed because the initial UI does not match what was r

Changing video-background based on weather description using React

I am trying to have it so that the video background of my weather app will change based on the weather condition using React. This is my App.js import React

Maps vs Objects vs Arrays for core data structure in React app with document database

My app aims to allow communal viewing+editing of what are essentially tables. It's a react app (with typescript), so being useable as react component state is r

"Warning: Cannot update a component" when creating a user with Firebase react hooks

In my React App I want to create a user with Firebase react hooks using createUserWithEmailAndPassword authentication but I get these errors. Error 1 POST http

Why can't I directly modify a component's state, really?

I understand that React tutorials and documentation warn in no uncertain terms that state should not be directly mutated and that everything should go through s

Select products indiviudally in react js

the component holds a bootstrap cart inside and my button is rendered inside that cart to be specific. how to edit each one of the buttons individually enter im

How to type unique letters only in input text box in html or react?

I want to create an input box that allows to type only a distinct alphabet letter in the input box ( No duplicate alphabet value, ONLY ONE) I looked up all the

How to add styles to individual elements in react using e.target, when a button is clicked?

I am trying to add styles to the inidividual elements. I want when an individual div( is clicked to make sure that the paragraph of the specific changes from d

How to search for item in a list from MongoDB in react js?

I want to make a website where all my data come from MongoDB by fetch. In the search button, I want to get a single item by clicking the search button.

Material UI DropDown Focus Remove

I want to remove the focus background color for the target dropdown <Dropdown options={branding} fullWidth id

Prevent multiple fast clicks from triggering API

For my project a instagram-clone, I have a like and dislike button. If there are no likes or dislikes from the current logged in user, both will show black. If

Delay STATE change in React

I'm writing a website. It's a website that uses and fetches data from a stock API to displays stock prices and charts. I have a search bar which changes state w

setInterval freezes react app after some time (couple days)

I have a react app (nextjs) and show a QR code that refreshes itself every 5 seconds and a clock which updates every 1 second. Further, I have added service-wor

How can I align my text and put the button on the extrem right of my gray bar?

how can I display my Invitee2 a bit upper in my gray bar ? And for my button how can I put it on the extrem right side of my gray bar ? <div className="bg-gr

Rebinding the react html input values after API call

I am using two inputs with their respective buttons, whenever I click button1 of the input1 the API is called which returns the text that should be bind to seco

Objects are not valid as a React child (found: [object Error]). If you meant to render a collection of children, use an array instead.]

i think the error is from the checkout screen but i just cant find the '<' which is make believe that the error origin is from node_modules can anyone find t

MQTT instead of wss on browser

When I run this code with nodejs, it works fine both on wss(code commented) and mqtts protocol. However if I run this on browser, it only works with wss. I trie

React router : update props

I am new to react, I have a component UpdateInvoice which has as props idInvoice and a boolean isNew. this component do two things if isNew is true the componen

React - Navigating between urls without page loading

I am building a website using react. I have a url http://0.0.0.0:9000/courseware/course/6/content/programming/issues/lab/1 which shows a list of issues belongin

How to pass redux props to styled component in react typescript

i'm pretty new to typescript and there's something that is not very clear to me. I'm trying to pass a prop to styled-component file, the prop arrive from redux