Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
¿Por qué obtener el error 404 en el enrutamiento en next.js?

Tengo una aplicación Next.js. Inicialmente, la página de inicio se carga al usuario y después de un temporizador de 10, el usuario debe ser redirigido a una página de comentarios:

 const router=useRouter(); if(timer==0) { router.push('/feedback'); clearTimeout(time); }

Sin embargo, en el momento del enrutamiento a la página de comentarios, recibo el siguiente error:

 404 This page could not be found.

Página de comentarios:

 import type { NextPage} from 'next' import Head from 'next/head' import Image from 'next/image' import styles from '../styles/Home.module.css' import {useState} from 'react' const Feedback: NextPage=()=>{ const [name,setName]=useState(""); const [email,setEmail]=useState(""); const handleSubmit=(e)=>{ e.preventDefault(); console.log(name); console.log(email); } return( <form onSubmit={(e)=>handleSubmit(e)}> <div> <label htmlFor="name">Name</label> <input type="text" id="name" value={name} onChange={(e) => setName(e.target.value)} /> </div> <div> <label htmlFor="email">Email</label> <input type="text" id="email" value={email} onChange={(e) => setEmail(e.target.value)} /> </div> </form> ) } export default Feedback;

A pesar de tener una página de comentarios en la carpeta de páginas, recibo este error.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!