Category "reactjs"

Tailwind custom background-image not working in production

In my CRA project I've added my own background images by editing the theme.backgroundImage section of my tailwind.config.js file. The images show up locally bu

react-scripts build generates wrong path for sub folder

My application should be served at /sub-folder so in the package.json the homepage field is set to "homepage": "/sub-folder/", The production bundle generated

deprecated errors while installing packagesin gastby

I am using a Gatsby theme and facing this errors while installing packages , I've tried npm install --legacy-peer-deps but when I run gatsby develop I get th

REACT-PDF library - webpack < 5 used to include polyfills for node.js core modules by default

Please, I am a student and I wanted to level up my skills by using different libraries and I have been trying to use react-pdf. I have followed this tutorial -

How to use OAuth 2.0 flow in Google One tap Sign In?

I know that I can use the access token that I receive in the response can be use to authenticate users. But I want it to be more secure So I want the code that

How to set the background color of Tab.Navigator?

As you can see below, I've tried many ways of setting the background color to green, all to no avail. The background remains blue like the image. The inactiveC

Input field validation in React Js?

I am having a variable (in real app it is api) called data which contains value as nested items. From the level 1 it has title which is displayed already then

React - Error, Hookrouter invalid hook call

can't handle this error any suggestions? import "./App.css"; import { navigate, useRoutes } from "hookrouter"; const routes = { "/": () => <h1>h

React Redux state is not being updated when using useSelector inside useEffect

I'm new to react and when I'm updating my state in redux, I'm no able to see my state updated in my component inside a setInterval, despite the state in redux i

I tried simple print function using react-to-print. Parsing error: Unexpected token, expected ","

I tried to print simple table using react-to-print. I got Parsing error: Unexpected token, expected "," at line no 24 "const". I am new to react. import React

Fetching Video(Mp4 format) Using Axios in React and displaying in HTML video

I was trying to fetch a video from backend in the form of byte stream and i was able to get video from backend. But i am unable to handle the video on front end

Fetching Video(Mp4 format) Using Axios in React and displaying in HTML video

I was trying to fetch a video from backend in the form of byte stream and i was able to get video from backend. But i am unable to handle the video on front end

React Chat Engine Loading

I create small chat application using react chat engine library. This is the UI image But chats are not loading even I provide correct credentials. It's gives

.next folder size increases in Next react App

We have developed the nextjs react application, which is ready in production now. It leads to some storage issues. we inspect a lot and finally found .next fold

jest test case for URLSearchParams

search looks like this search: "?productId=1234" and changeId is action const urlParams = new URLSearchParams(window.location.search); const productId = urlP

React useContext to pass person object from signup to phone verification

I working on a portal using react and I am trying to pass the form data which is an object from the signup page to the phone verification page so I can verify a

'TypeError: Converting circular structure to JSON' in a Lerna workspace with CRA and Typescript

I have a Lerna Workspace with some packages and a webapp created with create-react-app using TypeScript. When I try to add node-sass (needed for customizing ag-

Create a global function like jest does

I am working on a meta framework that will use react. I would like to offer some functions that are directly available without the need of an import, exactly li

Ensuring sensitive code is run only server-side with NextJS, where can such code be ran from?

I'm learning NextJS and I'm trying to determine how to layout my project with a clean architecture that's also secure. However, I'm not sure about where to stor

Can't make Axios post request to Express server (CORS)

I've been trying to make a simple image upload form using react, axios and multer, but I can't figure out a way to deal with cors ! Here is my form (running on