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

99
Views
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 answers
Answer question

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 Report
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!