Category "reactjs"

__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

How to display count of notifications in toolbar icon in react native

I am wanting to create a react native badge count for my app. I have been searching the last week with out any luck. I am wanting to do something like the image

No app icon in windows 10 native notification header in Electron

The place for the icon is empty. The application itself has it, and everything is fine with the title too Code function showNotification () { new Notification

React project firebase deploy showing welcome screen

Deployed my react app on firebase through my VS code terminal, on clicking the url generated, it's showing me the attached firebase welcome screen. Please who k

Victory charts doesnt update when data changes in React

I'm using victory chart to display data from api. When i search a date through search date component , I noticed when the data changed, the chart didnt re-rende

In reactJS, how to copy text to clipboard?

I'm using ReactJS and when a user clicks a link I want to copy some text to the clipboard. I am using Chrome 52 and I do not need to support any other browsers

Which React TypeScript version to use in development?

I have an existing TypeScript React project that was created before Hooks existed in React, and I'm trying to rewrite all the classes using Hooks. Thus in my pa

Why can't `useCallback` always return the same ref

I don't understand why useCallback always returns a new ref each time one of the deps is updated. It results in many re-render that React.memo() could have avoi

Why can't `useCallback` always return the same ref

I don't understand why useCallback always returns a new ref each time one of the deps is updated. It results in many re-render that React.memo() could have avoi

React Native inline styles and performance

Does the following: <Text style={{color: 'blue', fontSize: 30}} /> Have any performance implications compared to: <Text style={styles.blueButton} /

import @react-pdf-viewer/core in meteor js 2.2 cause a problem

import {Worker ,Viewer} from @react-pdf-viewer/core; enter image description here