Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React link to static html page?

i have a React + Redux app, i want to link to a privacy.html page which is a static html file in the root of the project along side with index.html which is the react app.

The problem is that the link to /privacy.html is caught by the <Route path='*' component={NotFoundView} />

Is there a work around for this?

like image 804
Israhack Avatar asked Dec 29 '15 09:12

Israhack


People also ask

Can you use React for a static website?

React-static is a progressive static site generator based on React and its ecosystem. Because it is powerful, lightweight, and fast, it will be a great option for your next React app. React-static has been carefully designed for user/developer experience, flexibility, and performance.


1 Answers

Don't use Link for pages outside of your app. Simply use a standard <a> tag.

like image 132
David L. Walsh Avatar answered Oct 14 '22 06:10

David L. Walsh