3

I'm creating static .html files from my React Apps with https://github.com/gajus/usus (background job)

and put it in the /public and make new folder ie. /article/

Issue : whenever I open that html file ie. aaa-bbb-ccc-ddd.html it is rendered firstly and then the index.html show up at last.

How to properly open .html file in the React Js app?

NB : I'm using create-react-app

Hanny Setiawan
  • 501
  • 4
  • 14

1 Answers1

2

say, you have test.html in public/article/, then in the src/example.js you can use <a href='/article/test.html' target='_blank'>link to test.html</a> to open test.html in a new window.

x_c
  • 21
  • 4
  • 1
    Hi there, welcome to stackoverflow. Please consider editing your answer to describe the solution instead of referring to an attached image only. It will be more useful that way, as the content can be indexed and found later – HAVB Mar 23 '18 at 13:18
  • yes, your answer is useful, but the format is a mess. – Hanny Setiawan Mar 27 '18 at 12:29