Category "reactjs"

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

Formatting code with <pre> tag in React and JSX

I am trying to use the pre tag inside of JSX.When you use the pre tag in JSX, it doesn't format at all. Why? In order to use the pre tag I need to do something

React-Dropzone how convert each file to base64

I am using react-dropzone plugin for file uploads. I worried how i can convert each file to base64: eg: Here is my function where i get files: I am creatin

Solution for showing a specific start and end time of a long video file. using react js or node js?

Imagine this scenario: There is a blank page with only two input fields that users can input timestamps like this: start: 00:20:21.330 end: 00:22:31.330 There

React-Dropzone how convert each file to base64

I am using react-dropzone plugin for file uploads. I worried how i can convert each file to base64: eg: Here is my function where i get files: I am creatin

Unknown symbol showing on developer console - react

I am getting this Symbol ( Æ’ ) on my React components area, next to props description. What does that mean? When I try to search for this on google

Zip File Download via Axios from Express Server not working in React App

I have implemented a backend where administrators can create backups. These backups are collected in zip files and are stored in a non-public folder on the serv

React DatePicker Bootstrap up to date

I searched for a good datepicker in React using bootstrap style. But everything I found wasn't working well or was not up to date... I'm working with React 15.