Answer the question
In order to leave comments, you need to log in
How to solve this React js problem?
I have a stories component and there are buttons on several pages that should link to that component. The problem is that app js has a header and footer and they should not be there. How to solve this problem?
import React from "react";
import { BrowserRouter, Switch, Route } from "react-router-dom";
import { Header } from "./components/Header";
import { Home } from "./pages/home/Home";
// import logo from "./logo.svg";
class App extends React.Component {
render() {
return (
<BrowserRouter>
<Header />
<Switch>
<Route path="/" component={Home} exact />
</Switch>
</BrowserRouter>
);
}
}
export default App;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question