Category "reactjs"

React redux toolkit testing with jest, how to dispatch asyncthunk and the state?

I want to write unit test which checks if data (onLoad) from dispatching async thunk is delivered into state. It's first time when i'm writing unit tests and it

Multiple endpoints Graphql

Im working on a project that displays a list of .xml and .txt files on a web browser. Using a MERN Graphql stack, is it possible to have two different endpoints

React-chartjs-2 update height dynamically

I am using react-chartjs-2 library. I have used HorizantalBar which will receive data through props dynamically from parent component. I have wrapped Horizantal

Programmatically navigate using React router

With react-router I can use the Link element to create links which are natively handled by react router. I see internally it calls this.context.transitionTo(.

React native modal vs react-navigation modal, which is more performant?

As of now, I am using React native modal right now. My modal contains some lightweight animation inside it. Now some questions are poking for a while. Should I

how can I fix this problem npm error to install my react app?

npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/html-

Alan AI Error Uncaught Error: The Alan Button instance has already been created. There cannot be two Alan Button instances created at the same time

I am developing an E-commerce website AI powered Voice Command Using Alan AI. But Whenever I come back from another route, there's a blank page appears.and this

Polling API every x seconds with react

I have to monitoring some data update info on the screen each one or two seconds. The way I figured that was using this implementation: componentDidMount()

React Source code: What does it mean by "real internal dependencies"

I was browsing the React source code and noticed ReactDOMFiberFBEntry.js. This file has the following comment: // These are real internal dependencies that are

Unable to update react state with an array

I can make a successful call to getApiSuggestions with data returned. However I'm unable to assign this to my state. As you can see my console output shows tha

Warning: React does not recognize the `secondaryFill` prop on a DOM element

My code in App.js import * as React from 'react' import { View } from 'react-native' import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome' im

React context between microfrontends

TLDR; How to use a single context between react micro frontends? The application is divided into multiple Microfrontends or react apps. Each of these is running

Label must have associated control

There is a div with some elements in it and I want to add a label to it. This is the original: <div className="upload-image"> <i

React component run error.Uncaught Error: Minified React error #31

I am trying to return some html label when write render in my component. Code like this: import React, {Component} from 'react'; import Request from 'react-h

How to add PAYTM gateway integration in react js web application?

I got it working from here https://github.com/paytm/paytm-pg-node-sdk-sample/blob/master/javascript/DemoApp.js I used this in express and it is working but now

React and TypeScript—which types for an Axios response?

I am trying to present a simple user list from an API which returns this: [{"UserID":2,"FirstName":"User2"},{"UserID":1,"FirstName":"User1"}] I do not understa

Mobile Safari Not Showing My Video Texture

I have a question similar to this one, but in my case, it's iOS causing troubles (not macOS, which I haven't tried yet), so I hope it's OK to post this as well.

Cors issue i also set the proxy in pkg.json due to cors and set the api according to it but this error is not remove

GET http://localhost:3000/api/fetch?search=12312321 404 (Not Found) cors issue in Reactjs and node js i use the proxy method in Reactjs but can't get rid

Return back array from another component React

So I currently have a Parent component, and a child component. The parent component consists of the following: import React, { Component } from 'react' impor

Return back array from another component React

So I currently have a Parent component, and a child component. The parent component consists of the following: import React, { Component } from 'react' impor