I'm using Enzyme's shallow method to test a component which uses the useParams hook to get an ID from the URL params. I'm trying to mock the useParams hook so
I have the following files... useAuthStatus.js import {useEffect, useState, useRef} from 'react'; import { getAuth, onAuthStateChanged } from 'firebase/auth';
I'm a newbie building an App that utilizes React Router to switch between 3 different components that each utilize Axios to fetch data from an API. I am trying
I am creating a project using reactjs.In my application i am getting the active route using this: this.context.router.isActive but getting undefined, i am us
I looked around and tried to find a solution with React router. With V5 you can use <Promt />. I tried also to find a vanilla JavaScript solution, but not
I'm having the following issue. I am implementing SSO which, after successful sign in, redirects the user to the root uri with the access_token as a query param
I'm having an issue I can't really find any previous answers to or documentation about. I'm loading a component, in a module, on my local machine, "login.jsx,"
I'm trying to use react-router with reactstrap in a create-reat-app .In the routing page i needed to use state for the reactstrap so i converted the router from
I am using react router specifically the HashRouter since I am trying to host my react app on github pages. Prior to using the HashRouter I was just using the B
I have a react app, created using create-react-app. After I run npm run build, and deploy the app as a static site, everything works except when I refresh the
I am trying to make a rather big, scalable application and I was told it is best practice to have one single store storing the current global state (including b
I have React App with sidebar menus, but I want to hide few of them based on User Role, but don't want common roles like 'ADMIN' , 'MODERATOR', etc. I want to m
I am working on a react spa to show alert on unsaved form changes. I am using [email protected] Prompt Component for this use-case. The p
I'm working in a SPA in React that doesn't use React Router to create any Routes; I don't need to allow users to navigate to specific pages. (Think multi-page q
I am trying to manage a react app with react router and node js server my router in react: <BrowserRouter> <Switch> <PrivateRoute tok
I am working on a project where I have to pass data from one page to another. For example, I have data on the first page. let data = [ {id:1, name:'Ford', co
I have installed react-router-domV6-beta. By following the example from a website I am able to use the new option useRoutes I have setup page routes and returni
I can't figure it out why doesn't work. I have uninstalled the react-router-dom package and reinstalled it, but I always have the same error. The error I'm gett
What is the alternative for Prompt in React Router V6, has it been deprecated, and also hooks like usePrompt, useBlocker are also not available. <Prompt mess
I am trying to navigate to "/quiz" when Start Quiz button is clicked. However when I compile my code I am getting the following error on the website applicatio