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

100
Vistas
I cannot get the About Component to display on React

I am trying to have my React code display. I followed an ecommerce website YouTube tutorial and I have tried everything to get it to display. I have read up on React routers and switches, but I really cant spot my mistake.

The Switch and Router

<Switch>
    <Route exact path="/">
        <Products
            products={products}
            onAddToCart={handleAddToCart}
            handleUpdateCartQty
        />
    </Route>
    <Route exact path="/about">
        <About About={About} />
    </Route>
    <Route exact path="/cart">
        <Cart
            cart={cart}
            handleUpdateCartQty={handleUpdateCartQty}
            handleRemoveFromCart={handleRemoveFromCart}
            handleEmptyCart={handleEmptyCart}
        />
    </Route>
    <Route exact path="/checkout" exact>
        <Checkout
            cart={cart}
            order={order}
            onCaptureCheckout={handleCaptureCheckout}
            error={errorMessage}
        />
    </Route>
</Switch>;

The About component

import React from 'react';

const About = () => {
    return <div>Tacos are delicious</div>;
};

export default About;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this:

<Route exact path="/about"> 
  <About />
</Route>

You seem to be passing an unnecessary prop by the same name as the component.

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