Category "reactjs"

Why does my TOC component add `{"-" + 1}` to its links every time I click on one of them?

I implemented a table-of-contents component to my site following this tutorial. It works, but every time I click on one of the TOC's links, all the links (inclu

React Native Debugger "Unsupported DevTools backend version"

When I try to debug my app with React Native Debugger I got that error: " error from react native debugger then I do that instruction. install react devtool, an

How to integrate media session api with React?

I have a simple react audio player and I want to integrate Chrome's media session api so that the player can be controlled through the browser. How would I go a

how to set ID for every bubble message and then update using its ID

Easy way to understand what is my question play the following video and see what is my problem. https://vimeo.com/315390850 if you dont have a good inernet con

Can I use OverlappingMarkerSpiderfier with react-google-maps?

I'm working on a project which uses react-google-maps (https://github.com/tomchentw/react-google-maps) library. It works well, but we stumbled upon a problem w

Just after installing uuidv4, it shows error which is as follows:

one ERROR in ./node_modules/util/util.js Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): Error: ENOENT: no such file or directory, open

React with Truffle contract- Resources must be listed in the web_accessible_resources manifest

I am developing a React app with Truffle and when I call the function from the contract I get the following error: Uncaught (in promise) DOMException: Failed to

How do I add WebPack polyfill to React App created with React Create App without ejecting?

I have a react App and I'm trying to use a library which gives me these errors: ERROR in ./node_modules/esm/esm.js 30:10-27 Module not found: Error: Can't resol

match.params.id not working in react router dom

I have installed the latest version of react-router-dom in my project. And it is saying match is undefined. However, it works fine when I use react-router-dom@5

Error: Child Compilation failed - Module.createRequire is not a function

I have worked on a React/Typescript application on my Mac Machine, and zipped up the application (including node_modules) and emailed it to a colleague via Goog

How to fix the problem of react app not loading in Safari?

I built an application by using create-react-app, react-redux, react-router-dom, and material UI. The app uses Fetch API for http requests. It's working in Chro

How do I extract data from a string into a 2d array?

Using axios, I am fetching data from a website. Unfortunately,the data fetch is in HTML format. The data fetched is like this: 1 Agartala VEAT 120830Z 23004KT 5

MUI React, Minimum Date

How can I set Minimum Date, so the user can't pick To Date that is before From Date. Here is my Two Date Pickers, using moment to format the date.

Submitting form from parent component

I would like to create a form where the submit button is located in the header. I'm currently using react-hook-forms but am having difficulties being able to su

React app returning 500 Internal Server Error

I have a react app, created using create-react-app. After I run npm run build, and deploy the app as a static site, everything works except when I refresh the

Loading micro frontend root App component's CSS in singleSpaReact on mounting to the host application

colleagues! Need a piece of advice! Micro frontend in singleSpaReact does not load root's component CSS at the mounting, but only page CSS according routing nav

How to get loading progress in React.lazy and Suspense

I'm using lazy to split my routes and I wanna know if there is any way I can get the loading progress in lazy and suspense. Currently I'm using it like this.

Can't save state in React while POST API request

I have handleSubmit function that send two POST request, one for img upload and one for other information. I want to take the response from the img upload reque

How to add multiple components into one story using Storybook?

I just started using storybook, and I need your help. I've four components for the different icons, and I want to create one story for all of them instead of cr

How can I edit compressed JS files

I have had a developer create a website or app in React. This is already on a webserver and does what it should do. Now I want to develop the frontend myself, w