Category "reactjs"

How can I hide the userid of a user from the session storage while inspecting?

While storing data in sessionStorage for a react app, I can't hide the user's userid in the browser. How can I do it?

Uncaught TypeError: Cannot read properties of undefined (reading 'common')

import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; const CountryDetail = () => { const {countryname}=u

(MERN App) All API calls returning 504 (Gateway Timeout) on Heroku deploy yet working fine locally

I have built a MERN stack app which has a few different API calls. It works as expected locally however it returns 504 (Gateway Timeout) for all the API calls w

Uncaught TypeError: Cannot read properties of undefined (reading 'common')

import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; const CountryDetail = () => { const {countryname}=u

(MERN App) All API calls returning 504 (Gateway Timeout) on Heroku deploy yet working fine locally

I have built a MERN stack app which has a few different API calls. It works as expected locally however it returns 504 (Gateway Timeout) for all the API calls w

Can't center image and fill screen with video on NextJS app

I am trying to: center the image above the waitlist sign up have the background video scale in some relative way so that it doesn't have to load in a perfectly

Tailwind V3 causing TypeError: Cannot read property '500' of undefined

I recently tried to upgrade my project to tailwind css and I'm getting this error this is my tailwind config module.exports = { mode: "jit", purge

React-scripts test: no traceback on exception

I remake browser version of TacticToy game with React, and during unit-tests writing I've got a problem: there is no full traceback of a custom exception, only

how to install and use react toast?

import React from 'react'; import { ToastContainer, toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; function App(){ const no

React Bootstrap table 2 search issue

We are using a React-bootstrap-table for the table and we are facing an issue in searching the data in the table while using pagination it searches data only fo

How to extend components of this type - PaperTextInput.Icon or Tab.Navigator when using styled components?

I noticed that my attempts to extend components like PaperTextInput.Icon or Tab.Navigator are failing and I'm wondering how am I supposed to extend them? What I

Radio button validation not disappear when select a button using Formik and Yup

I am working to handle a signup form with next js, I used Formik from form and Yup for validation, all things are working correctly except radio buttons. The er

React.js: How to get and show current user when logged in?

In my React app I am working in user login. My goal is to show current user's username when the user is logged in. I'm fetching the user data in redux actions a

React.js: How to get and show current user when logged in?

In my React app I am working in user login. My goal is to show current user's username when the user is logged in. I'm fetching the user data in redux actions a

React - TypeError: Cannot read properties of undefined (reading 'params')

So I'm having an error message - TypeError: Cannot read properties of undefined (reading 'params') TypeError: Cannot read properties of undefined (reading 'para

React - TypeError: Cannot read properties of undefined (reading 'params')

So I'm having an error message - TypeError: Cannot read properties of undefined (reading 'params') TypeError: Cannot read properties of undefined (reading 'para

Optimistic updates for item create in RTK Query

Can't figure out how to get optimistic updates to work properly when I'm creating a new item rather than updating the existing one. The optimistic updates do wo

How to map one image at a time with Alice carousel?

I am trying to add a carousel for my products. I have an array of url images in product.images that i want to show individually in the carousel but when i map t

Next JS: getServerSideProps cant get cookie [duplicate]

I want to return two cookies, but only one is returned only token cookie, while key cookie cannot be used export async function getServerSideP

'sh' is not recognized as an internal or external command

Creating a new React app in E:\rn-starter\my-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with