Category "reactjs"

How to send an image and additional data body using fetch

I'm trying to upload an image to a serverless function on firebase. I'm sending the request like this: const updateProfileImage = (image) => { fetch(

How to make the dev tools not show up on screen by default in Electron?

I am using electron-react-boilerplate to create an Electron-React app. The dev tools show up on the screen by default. How can I make the dev tools only appear

Module build failed: UnhandledSchemeError: Reading from "alias:/path" is not handled by plugins (Unhandled scheme)

I am creating a new react app and trying to configure webpack compiler from scratch. The issue happens when running the build command with webpack -c config/web

How do you programmatically update query params in react-router?

I can't seem to find how to update query params with react-router without using <Link/>. hashHistory.push(url) doesn't seem to register query params, and

How to use horizontal weight meter in react native

I'm making a react native app now. I need to use a horizontal weight scrollbar in the app like the image which I attached. When a user scrolls the horizontal sc

react-leaflet-markercluster is not working

I'am trying to use react-leaflet-markercluster, but after I add <MarkerClusterGroup> to the code, errors are displayed in the console and the page does no

TypeError: undefined is not a function (evaluating 'this.state.list.map')

so I'm trying to push a variable onto an array called list from my state. But it is throwing off this error saying that undefined is not a function. However, wh

Is there a library similar to Vueuse but for React?

Instead of having many dependencies for individual hooks, I am interested in a single curated and tested library like Vueuse, but for React. Does something like

React: Passing down props to functional components

I have a seemingly trivial question about props and functional components. Basically, I have a container component which renders a Modal component upon state ch

VS Code Scatters Next JS Files [duplicate]

I am learning NextJS right now but I can't seem to proceed, as anytime I make a change and hit CTRL + S The codes become scattered. See screen

__webpack_require__ is not defined. Here map bundle doesn't work

I've got an issue inside web worker when tried to use @here/maps-api-for-javascript. I think that happens since the webpack changes the code that runs inside th

Validating file presence with YUP

I'm using Yup to validate my form. In one of my form, I want to validate that one <input type="file" /> has a file. I've tested this (and it's not workin

contextBridge.exposeInMainWorld and IPC with Typescript in Electron app: Cannot read property 'send' of undefined

I defined contextBridge ( https://www.electronjs.org/docs/all#contextbridge ) in preload.js as follows: const { contextBridge, ipcRenderer } = require("elec

TypeError: Cannot destructure property 'name' of 'item' as it is undefined

** I can't figure out the problem here. Can anyone help me please ** When I pass item as props I got TypeError: Cannot destructure property 'name' of 'item' as

@testing-library/react render Error: `target` and `targetRef` props are `undefined`, it' required to use one of them

I am trying to write a unit test for a custom react component that use the Dialog from @fluentui/react-northstar when I try to render the component from the tes

HERE Maps JS API controls rending behind map

I'm trying to add the UI controls (zoom in/out and scale) to a HERE map and I see the svg for the zoom icon render and then the map render on top of the svg. W

React testing library, how to open a Collapse in Ant Design

I want to write a unit test that opens an antd. Collapse <Panel /> But no matter what combination of fireEvent or userEvent mouse actions I try, I cannot

Why should I use the next-js library in a react-native project

In the react-js project, I understand the benefit of having every page render on the server and not having to download all the pages when only one page is neede

Best way to render HTML emails in React app

I create an SPA React application that can send and receive email messages. What is the best way to render received HTML email messages? The task becomes probl

React SSR blinks when starting client

simplifying my post: my ssr webpage blinks when starting client which means page renders server side rendered html then goes blank and then it starts loading e