Category "reactjs"

How to install facebook event pixel in react component

I have a Facebook base code for lead tracking installed in my React app. All I want to do is to add fbq('track', 'Lead'); to my "Thankyou.jsx" component. All e

Handling with event input and debounce function

I'm trying to use this debounce function, in order to get a text inputted from user. Without debounce function, this works well (with the problem of triggering

ERROR in ./node_modules/axios/lib/adapters/http.js

I get this error after installing and importing axios in my react project, any help?: Compiled with problems: ERROR in ./node_modules/axios/lib/adapters/http.js

A side question to my earlier question: ternary operator

I want to ask you a quick question as a followup to my earlier question: React - syntax confusion to clarify code for TodoItem: import React from 'react' expo

Export 'Switch' was not found in react-router-dom

how can i solve this problem Compiled with problems: ERROR in ./src/App.js 20:37-43 export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' (

Display data in Table and Modal using ReactJs

I am new to react. I want to make dashboard using Reactjs and Reactstrap but I have a problem. I want to display my data in the table and show mya all data in m

react-leaflet map is not correcly displayed in Ionic 5

When i am trying to display map in mobile view i see broken map: https://stackoverflow.com/a/36257493/13739566 - in this link is description why it doesn't

How to multiple TextInput handle with single handler?

I have create common class for TextInput and use it multiple time but its event handle with same method. i want to handle array data after filled the data in te

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