I am using react-dom-router to routes between my app components , I want to create a component (SeperatePageCompoenet) that when user navigate to the URL (http://localhost:3000/seperatePage), the compoenet will be rendered without using the imported "App.css" file, and does not include the compoenet that is rendered in App.js component.
This is my index.js compoenet:-
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import "bootstrap-v4-rtl/dist/css/bootstrap-rtl.css";
import "bootstrap-v4-rtl/dist/js/bootstrap.js";
import "./App.css";
import { BrowserRouter } from "react-router-dom";
//import * as serviceWorker from './serviceWorker';
ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>,
document.getElementById("root")
);
App.js File:-
import React from "react";
import Header from "./components/Header";
import Home from "./pages/Home";
import About from "./pages/About";
import Login from "./pages/Login";
import Account from "./pages/Account";
import Contact from "./pages/Contact";
import NewPost from "./pages/NewPost";
import Test from "./pages/Test";
import { Switch, Route } from "react-router-dom";
import NavBar from "./components/NavBar";
import Signup from "./pages/Signup";
import Post from "./pages/Post";
function App() {
return (
<div>
<Header />
<NavBar />
<div className="container rtl">
<Switch>
<Route exact path="/" component={Home} />
<Route path="/about" component={About} />
<Route path="/create-new" component={NewPost} />
<Route path="/contact-us" component={Contact} />
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
<Route path="/account" component={Account} />
<Route path="/post/:id" component={Post} />
<Route path="/test" component={Test} />
</Switch>
</div>
</div>
);
}
export default App;
The purpose of this, i want to view a text with full view page, without using the background-color that has been set in App.css file, and without including the navbar in the page.