Category "reactjs"

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema

I have been stock on this error on my project when I add "proxy": "http://localhost:6000" in my package.json. This is the error response after yarn start. Inva

Clear an input field with Reactjs?

I am using a variable below. var newInput = { title: this.inputTitle.value, entry: this.inputEntry.value }; This is used by my input fields. <

Trouble with react-countup and easingfn

I'm trying to make a countuptimer (up to 2022) in React using react-countup library. https://www.npmjs.com/package/react-countup I can't get the timer to do a s

Making renderToNodeStream work with an async Helmet version

I am trying to convert my working SSR code from renderToString to renderToNodeStream, which became available in thew React.JS, for improved time-to-first-byte.

Test fails with "TypeError: theme.spacing is not a function" after migration from MUI v4 to v5

Have design system created/customized with MUI v4. Decided to update to V5 using this manual. All steps are done (with codemods and manual fixes), except moving

Buffer is not defined, after migrating from CRA(create react app) to vite

After having declared and done all the config files, when I start the server I get Buffer not defined and the error points to an npm module. Uncaught ReferenceE

Buffer is not defined, after migrating from CRA(create react app) to vite

After having declared and done all the config files, when I start the server I get Buffer not defined and the error points to an npm module. Uncaught ReferenceE

React useEffect is not triggering on route change

I expect that console.log('Refresh') runs every time the route changes (switching from Component1 to Component2). But it's only triggering on first render. Why?

How can I pass touch events to react-draggable

I'm currently using react-draggable to implement resizing table columns see example: https://codesandbox.io/s/j30k46l7xw This is not working on most mobile de

How to change base url of create react app?

I'm using react-router-dom with create-react-app. Running scripts with yarn start, it starts with http://localhost:3000/(myprojectname), not http://localhost:30

How do I ensure that using `gcloud app deploy` is using my build folder not my dev files?

I am new to google app engine. I have a react app Before deploying to production I use npm run build which creates / updated the build folder. Then I push my

how to import css file in react when generating static html and inject imported css into html head tag?

I am trying to generate static html from react using renderToStaticMarkup method. The problem I am facing right now is that I am not able to import css into rea

plugin is not working in Webpack with React JS

I am creating a React JS app. I have installed terser-webpack-plugin to both try to compress my code as well as remove console.log() statements. However, it doe

Next.js: custom font raises blinking

I'm creating Material-UI application using Next.js template. After custom font has been provided via npm/next-fonts the problem of twice font fetching is appear

React-Router v6 not rendering in production

I have run out of wisdom on this issue and hope for any ideas that could bring me on the right track. I have implemented a React.js SPA that uses react-router-d

How install a Bootswatch theme on React project?

I created a React project and I would like to install on it a bootswatch theme. The theme is display but some component of it that use js don't work. Like moda

When I click on a link, how can I change the status of another component?

When I click on a button, it redirects me to another component (#2) where there are two states and according to which state it shows one content or another. The

Call child method from parent

I have two components: Parent component Child component I was trying to call Child's method from Parent, I tried this way but couldn't get a result: class Paren

How do I get the address of the connected wallet with web3modal?

I'm building an application with next.js and web3. To connect the user wallet to the front-end I'm using web3modal as following: const Home: NextPage = () =>

TypeError: (0 , _dayjs.Dayjs) is not a function

I want to replace momentjs with dayjs right now. First I added the dependencies: "dayjs":"1.10.7" then import the dayjs like this: import { Dayjs } from 'dayjs