Closed Ghaleb-alnakhlani closed 3 years ago
This is the expected behaviour. You are not loading the pages as PART of your react app, you're redirecting to HTML pages (thus removing any control React has)
I usually use react-router to route pages :) This stack overflow answer handles multiple pages in React nicely.
Good luck!
Hi I have multiple routes in my React application most of them looks like below, these HTML pages are placed in public folder
<Route exact path="/" render={() => {window.location.href="Home.html"}} />
<Route path="/quiz" component={App} />
<Route path="/questions" render={() => {window.location.href="questions.html"}} />
<Route path="/profile" render={() => {window.location.href="profile.html"}} />
<Route path="/about" render={() => {window.location.href="about.html"}} />
It only display on the component App.js and not the other HTML pagesPlease any suggestion on how to solve that?