How can I create more than two pages rather than just index.html? What's the structure like?
for example, I would like to add another page "fun.html" along with "index.html", and I want to have "fun.js", "fun.css" under src file. But it doesn't work.
How to do that? Thanks!
Is that necessary to have other html files? Did you consider using https://github.com/reactjs/react-router to set up routing in the app?
@zebapy I am new to reactjs, I have not tried react-router yet. Thanks for your suggestion, I am going to try it.
Thanks!
@Batur24 the tool you're definitely looking for is React Router: https://github.com/reactjs/react-router
Typically in React you wont be creating new .html files, but rather creating routes.
Before using React Router, I would recommend to get familiar with HTML5 History API and experiment with it on a small page just to get a sense of the problem React Router is solving.
@eanplatter, @gaearon Thanks a lot! I will go to check it.
Most helpful comment
Before using React Router, I would recommend to get familiar with HTML5 History API and experiment with it on a small page just to get a sense of the problem React Router is solving.