-2

Checked the code and cannot find where I need to put a semicolon. Here is error. Here is the code.

Daria
  • 83
  • 1
  • 8
  • Please include any relevant information (that includes errors and code) in the question itself as text rather than images. That makes it easier for us to copy/paste your code into an editor to try to reproduce/fix the issue, and for others to find this question when they run into the same error message. – rickdenhaan Dec 08 '21 at 11:36

2 Answers2

2

It should be like this

const Routes = (props) => ( ... )
Kartik Bhalala
  • 390
  • 1
  • 10
0

It should be like this

const PropsPage = () => {  return (    <h3>Props Page</h3>  );};

for a

const App = () => {
  return (
    <section className="App">
      <Router>
        ...
        <Link to="/404-not-found">404</Link>
        <Link to="/props">Passing Props</Link>        <Switch>
          ...
          <Route exact path="/props" component={PropsPage} />          <Route component={NoMatchPage} />
        </Switch>
      </Router>
      <a href="/about">about with browser reload</a>
    </section>
  );
};

Passing function as a component props in Route component

const PropsPage = ({ title }) => {
  return (
    <h3>{title}</h3>
  );
};