Category "reactjs"

is there a way to implement react scroll along with react router dom?

I have a navbar with links that scroll to sections of page using react-scroll. i also have several pages and im using react-router-dom for navigating between pa

Netlify page not found 404 after clicking a button

I'm new to here, just have a question and want to solve it. I have deployed my app on netlify, everything works fine at localhost, but when I tested it on netl

How to stop infinite refresh in react webpack app?

When I change the TS file, Webpack doesn't stop refreshing the page. Console says: @ebpack 5.66.0 compiled successfully I've googled this and tried different pl

Why I can't install React and uninstall create-react-app in my system?

I have tried so many ways. But I can't find any solution. The problem is I can't install ReactJS in my system. Here is the message I get when complete my instal

plotly is undefined in react

i am creating a weather app in react which shows the weather forcast in a graph using the api but i am getting an error plotly is undefined although i have past

Best practice for React. Hover or mouseEnter/mouseLeave?

I'm learning React with styled components and I have a button with a simple hover-effect. This hover-effect can be created in the styled components file with &a

Getting the error "Nested CSS was detected, but CSS nesting has not been configured correctly" in React app?

I've been upgrading my CRA project to TailwindCSS 3, but now CSS nesting no longer works. Upon starting the server, the console spits out: (8:3) Nested CSS was

My dapp doesn't detect when an user change their Metamask Account

I am in the process of building a dapp for a project. I have one last thing to adjust: detect when a user changes metamask account to reset the state but it doe

Media Queries in Material-UI Using Styled-Components

Material UI has a nice set of built-in media queries: https://material-ui.com/customization/breakpoints/#css-media-queries Material UI also allows us to use S

Media Queries in Material-UI Using Styled-Components

Material UI has a nice set of built-in media queries: https://material-ui.com/customization/breakpoints/#css-media-queries Material UI also allows us to use S

Why the handleChange of Formik is not working when I set multiple functions?

I have problem on formik, the handleChange of formik is not working properly when I add other function inside the onValueChange. Is there any solutions for this

How i can do bubble sort to array with object?

There is a task to make array sorting through Bubble sort. I just can’t understand how exactly it is necessary to implement sorting of such an array, in w

Property 'background' does not exist on type 'unknown'. ReactJS/useHistory()

I'm getting this error Property 'background' does not exist on type 'unknown'.ts(2339), when I try to use this code const location = useLocation(); const backgr

setting "type" to "module" in package.json then not able to read es modules

CONTEXT: I'm trying to start with SSR using react, and I've ran into this problem before the updates, and I'm pretty sure I'm missing something obvious but I'm

Does getStaticProps fetch data every time I get back same page?

I am using routes to get page ex. page/[id].js and show data for that id only. So will it refetch data every time I visit this page? ex. going to the next page

Is it possible to pass props from a React Link to a functional component?

I have a sign up/sign on page, and I want to redirect the user to the last page that they visited on the site before they tried to sign up/sign on (or their pro

TypeError: state.find is not a function

I try to use the find() method but I get cartItems.find is not a function what happens? and how to fix it? import React, {useState} from 'react' function car

Does strict mode work differently with React 18?

Consider the snippets below. With React 18, count gets printed twice to the console on every render but with React 17 it gets printed only once. React 18 Exampl

What is the correct type for React Click Event?

I want to use a type for my event handler instead of using type any, Can anyone help me with this,please? here is the code I'm trying to refactor: const MyComp

dom is not updated after state change via Context API

I am quite new to React and tried to finish a project on FrontendMentor. It's basically a simple OPA of an online store with just one product and the ability to