Category "reactjs"

React Native Image Upload is not working with iOS but works fine with Android

I’m using react-native-image-crop-picker I have upgraded my Flipper for iOS version 0.142 I have upgraded my library as well var body = new FormData();

Gatsby + React-pdf

I'm trying to get react-pdf to work in gatsby and something is wonky with my webpack config. Tried different ways from different posts but nothing seems to do t

Send the selected option to the backend

I have a select menu (with three options) along with a search bar. All I want is to save the selected option and the searched term and send them to the back-end

React router dom (6.0.1) child route not working properly

I'm working with react-router-dom v6.0.1 and I'm trying to setup a simple tree structure composed. The problem is when I link the path /items Router redirectos

I am seeing following error while trying to add firebase analytics

I have linked firebase analytics to the firebase project recently but I am getting the following error in my console and nothing is visible in the firebase anal

Next/Image is failing on one image

I'm using next/image for my images on my site. All my images are being served through prismic and I've added the cdn domain to my next.config file. This is how

React.Lazy not working when consuming Micro frontend with webpack 5 and plugin Module Federation

What is happening is that I am consuming a Micro front-end through module federation, but even using React.Lazy the bundle (remoteEntry) is loaded at the start

How to add title of a article into URL in Reactjs?

I am trying to know if it is possible or not to add the title of an article into the URL after redirecting to a specific article? An example: https://www.analyt

How to apply HTML Table in React Native?

What I want is setting all the cells width in a column as widest cell in the column. For example I have a column and there are cells in that column. Cells have

Material UI unable to control the DatePicker error

I have a problem with the DatePicker, if there is an empty value it's red. And passing true/false to error doesn't have any effect. I even tried passing error

socket.io POST error and CORS policy error when sending messages too fast

In my frontend app I implemented mechanism which splits file into chunks and then sends their parts in a for loop like this (chunks is an array of strings - con

ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils'

I recently made some copy pasting of code base from my one device to other device. I copied everything including the node modules folder. Now when I am running

Property 'exact' does not exist on type

I am trying to use react-router-dom inside my react app and also I am using typescript instead of javascript. The issue here is that I can't import Route inside

React update outdated dependencies flagged by checkmarx

In my project, I have some outdated dependencies that have been flagged by Checkmarx. However, the dependencies flagged are in react-scripts version 4.0.3. For

Matched leaf route at location "/" does not have an element

Matched leaf route at location "/" does not have an element. This means it will render an with a null value by default resulting in an "empty" page //App.js Fi

What is the lifetime of the variables declared inside component file in React?

Consider the React code declared inside LoremComponent.tsx below: const foo = "bar"; export default (props) => { return ( <h1>{foo}</h1>

React hooks: Why do several useState setters in an async function cause several rerenders?

This following onClick callback function will cause 1 re-render: const handleClickSync = () => { // Order of setters doesn't matter - React lumps all state

Split Routes inside a single Switch into multiple components

I'm using React Router v5 and I ran into problems when trying to define routes split across multiple components. The case I tried is something like the followin

React jsx attribute avoid duplicate attribute name

I am using Nextjs I dont really know to describe my question but here is an example. In my code, I got few const pathname = router.pathname <NavItem pathname

How to open an S3 pre-signed URL in another tab?

How do I open an S3 file in another tab and not download it? I have this feature that generates a pre-signed URL. The front-end then opens this URL. However, wh