Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create more than one pages? #344

Closed
Batur24 opened this issue Aug 3, 2016 · 5 comments
Closed

How to create more than one pages? #344

Batur24 opened this issue Aug 3, 2016 · 5 comments

Comments

@Batur24
Copy link

Batur24 commented Aug 3, 2016

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!

@zebapy
Copy link

zebapy commented Aug 3, 2016

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?

@Batur24
Copy link
Author

Batur24 commented Aug 3, 2016

@zebapy I am new to reactjs, I have not tried react-router yet. Thanks for your suggestion, I am going to try it.

Thanks!

@eanplatter
Copy link
Contributor

@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.

@gaearon
Copy link
Contributor

gaearon commented Aug 3, 2016

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.

@Batur24
Copy link
Author

Batur24 commented Aug 3, 2016

@eanplatter, @gaearon Thanks a lot! I will go to check it.

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants