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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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
yes, your answer is useful, but the format is a mess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.