Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
Route function removes all displayed items in react.js

I have a react js project that I am working on and whenever I put this code (that is neccessary for my website):

<Route path='/contractor/:id' component={ContactorInfoScreen}/>
<Route path='/' exact={true} component={HomeScreen}/>

all the text, images etc. all disapear from my page. I have made sure that I have imported all the neccessary items from the correct file paths. These are the things that I have imported:

import logo from './logo.svg';
import data from './data';
import { BrowserRouter, Route } from 'react-router-dom';
import './App.css';
import HomeScreen from './screens/HomeScreen';
import ContractorInfoScreen from './screens/ContractorInfoScreen';

Is there possibly another item that I need to import that I have not already done so?

about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

Found the answer to my question. I needed to run this in the terminal:

npm install react-router-dom@5.3.0

I already had react-router-dom installed, just not the most recent revision.

Thanks for all the help that anyone has given. I really appreciate it

about 4 years ago · Juan Pablo Isaza Denunciar

0

There seems to be a typo in the name of the component ContractorInfoScreen in your Html...

This

<Route path='/contractor/:id' component={ContactorInfoScreen}/>

should be

<Route path='/contractor/:id' component={ContractorInfoScreen}/>
about 4 years ago · Juan Pablo Isaza Denunciar

0

There is a typo mistake on component={ContractorInfoScreen}

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda