Skip to main content

All Questions

0 votes
0 answers
40 views

Can I prevent the Next router from pushing back in history without any effects?

I have a simple code preventing a page with a form from closing when the form filling is started but isn't finished. Unfortunately, when a user tries to move to the previous page with the browser's ...
Vladislav Maksimov's user avatar
-5 votes
1 answer
84 views

is there a way to pass down props from parent component to child component

https://github.com/89missions/reactproblem/issues/1 I have posted all three files here please help. react-dom.development.js:4312 Uncaught Type Error: props.UserName is not a function at userValue (...
Kweku Gyekete's user avatar
0 votes
0 answers
47 views

React-Native Project: Navigation Issue

In my React-Native project, written in js, I'm having an issue with my routes. I'm using useNavigation and NavigationContainer from @react, initializing these routes using linking in the ...
David D'Silva's user avatar
0 votes
2 answers
42 views

NextJS Serverside console is undefined when trying to log data

I am trying to render some data on the console that is being brought in from my route handler. Here in /api/pokemon/route.tsx export async function GET() { const result = await fetch('https://...
Kar's user avatar
  • 11
0 votes
1 answer
26 views

NextJS route handler working when visiting directly via browser searchbar, but doesn't work when console logging it

Basically, I am trying to access some JSON placeholder data via my route handler defined in /api/posts/route.js export async function GET() { const res = await fetch('https://jsonplaceholder....
Kar's user avatar
  • 11
1 vote
1 answer
59 views

Updated total price when buy button is clicked in react.js

I have created a multi-page web application with products avaliable to purchase - as specificed is the task brief. However my Buy button doesn't work as it doesn't store the price of the product to be ...
NewQode10's user avatar
0 votes
0 answers
9 views

Application not rendering private routes [duplicate]

This are the routes in my App.jsx: I added the /* after I received You rendered descendant (or called useRoutes()) at "/home" (under ) but the parent route path has no trailing "*"...
Daniel's user avatar
  • 3
0 votes
0 answers
153 views

`router.push` not working in Next.js when clicking on submit

I'm working on a registration form in Next.js and I'm trying to redirect the user to an OTP verification page after successful registration. However, the router.push is not working as expected when ...
SWE's user avatar
  • 29
0 votes
0 answers
27 views

What is the correct way to link to the internal pages of static built application?

What is the accepted way to link to an internal page of a Static Built, Single Page Application (SPA), from outside the application. Lets say you have a Next.js static build hosted at example.com/path/...
aboyce's user avatar
  • 49
1 vote
0 answers
25 views

A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. What should I do? [duplicate]

I'm trying to connect my react app to my fastapi app and enable authentication but I keep having this error: "A is only ever to be used as the child of element, never rendered directly". ...
Tobiloba Faseyitan's user avatar
1 vote
0 answers
15 views

can't enter /dashboard commit, after login

When logging in, 2 messages appear on the console at the same time I have filled in the login form, and a success message appears in the console but the must login message also appears at the same ...
DG Alter's user avatar
1 vote
0 answers
30 views

Route at location "/" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page [duplicate]

It should navigate to "http://localhost:3001/auth/sign-in" route, whenever "/auth/sign-in" or "/auth/sign-in" routes are not matched. Is there any way to solve this ...
Gill's user avatar
  • 21
0 votes
4 answers
133 views

React Routes not Rendering Components

I'm currently working on a React application where I'm using React Router for navigation. However, I'm facing an issue where the components associated with routes are not rendering properly. index.js ...
laccc___'s user avatar
0 votes
1 answer
315 views

Invalid hook call, Cannot read properties of null (reading 'useRef'), Cannot read properties of null (reading 'useContext') while using Routes, Route

I am creating React App and everything was ok until I tried to connect the pages using Routes and Route. I got error: “Cannot read properties of null (reading 'useRef')” or ‘useContext’ in google ...
Klaudia's user avatar
2 votes
2 answers
92 views

How can I create one page for two dynamic routes?

I use the newest version of nextjs with app router, and I'm a little bit stuck with route organization. I need routing like that, but can`t figure out how to do it catalog/[category]/[id] ===> id....
Dmitrii's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
32