Category "reactjs"

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

Webpack dist folder not getting created in project folder?

Everything running fine, but could not able to find where is my dist folder.I am using publicPath as per documentation, still dist folder seems to coming from m

How to display data to table in React Js?

I'm trying to display some data received through API to table in React Js, data is received as object so I can't map trough it. What would be the best practice

use Effect is repeating lottie animation

Learning React here, and I'm simply trying to display a lottie animation. Seems fairly straight-forward, but I'm having some trouble with the useEffect hook.

How preserve query string and hash fragment, in React-Router 4 <Switch><Redirect>?

If you have a <Redirect> inside a <Route>, you'll get a location and can do: <Redirect search={props.location.search} hash={props.location.hash}

AWS: Authorize users to specific clients

So I have the following setup on AWS Cognito: AWS Cognito User Pool: UserPool_1 Under this User Pool I have 3 users defined: Mike, Sarah, John I have 3 App Clie

React functional components vs classical components

I'm trying to understand when to use React functional components vs. classes and reading from the docs they don't really go into detail. Can you give me some pr

Uncaught Error: Connection failed. rtcpeerconnection.t._pc.onconnectionstatechange

Here Is the Reactjs Component code It works fine in the same browser after deploying to heroku but when we join room from different internets this error Uncaug

click play button iframe react

I have an iframe video with a play button (not youtube!). There is no autoplay functionality. So, I want onLoad imitate click this button. How can I achieve thi

Same content on every page

how do I can have different content on different pages? I use app.js as a home, and contact for second page, but whatever change I made in App.js, the change wi

Default Values from API in MUI Text field

I have a form that I built using material UI that I would like to have their default values from an API. The main idea is an Edit screen where the user can edit

How to rerun useEffect when page is visible?

A react app using hooks. In useEffect there is an api-call to populate content on page. Each element fetched is clickable. And a click will open details for the

Why aren't the Tailwind classes taking effect in my Vite React project?

I have a Vite React project that uses Tailwind via PostCSS. However, none of the classes are reflecting the the localhost. Below are the files in the project: p

React Native Download Youtube video

I have tried many examples but all of them are not working. Many blog suggested many things. for example ; add library youtube-video-downloader , add ffbge , ad

@ffmpeg/ffmpeg: Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined

I have a small react app with a node.js backend (monorepo). The client is using @ffmpeg/ffmpeg, and all works fine locally, but when deployed to Heroku I'm gett

React setState not Updating Immediately

I'm working on a todo application. This is a very simplified version of the offending code. I have a checkbox: <p><input type="checkbox" name="area"

What is Virtual DOM?

Recently, I looked at Facebook's React framework. It uses a concept called "the Virtual DOM," which I didn't really understand. What is the Virtual DOM? What a

How to tell parent component that I need updated props?

I have a component which is a form that receives props. When I save the form I want to tell the parent component to send me updated props. How can I do that?

How to hydrate server-side parameters with React + Redux

I have a universal React app that is using Redux and React Router. Some of my routes include parameters that, on the client, will trigger an AJAX request to hyd