1

I have a HTML file with a list of links. Some of the links lead to other HTML files, but I want one to lead to a react application. I have not been able to open the app like I would a normal HTML though. Not through public/index.html or src/App.js.

How do I open a React application through a simple link?

Here is an example of the link list in the current HTML:

<a href="snake/game.html">Snake</a>
<a href="snake/game.html">Snake</a>
<a href="myApp/src/App.js">React App</a> <!--problem on this line-->
1
  • 1
    See if this helps: Add React to a Website. Assumptions: 1) you've successfully hosted your React app on the web site, and 2) the procedure that the article describes matches what you're actually trying to do. Commented Jun 29, 2021 at 20:58

1 Answer 1

2

Write the link of server of react that you have started using npm start . It's http://localhost:5000 by default. So write

<a href="http://localhost:5000">React App</a> <!--problem solved-->

But make sure you have started react app on server by npm start

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.