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 incorporate react-router? #47

Open
younanjo opened this issue Dec 9, 2017 · 3 comments
Open

How to incorporate react-router? #47

younanjo opened this issue Dec 9, 2017 · 3 comments

Comments

@younanjo
Copy link

younanjo commented Dec 9, 2017

Can someone suggest how one would go about adding react-router v4 to the mix so that react handles all the routes other than /api/*.

@xiaoyunyang
Copy link

xiaoyunyang commented Jan 12, 2018

@younanjo check out my project here in which react-router v4 is incorporated. It's a work-in-progress and there are extraneous code, but you can see a working version of routing on the frontend.

@borisyordanov
Copy link

@xiaoyunyang Your project is quite big. Not sure where to look for the react-router incorporation. Can you point me in the right direction?

@xiaoyunyang
Copy link

@borisyordanov I suggest you start with this starter project repo, which is a lot smaller and easier to follow. There's an tutorial I wrote on this repo to walk through how to set up this project.

This starter project does not have create-react-app hookup. If you want to see how to incorporate it into the create-react-app project, what you want to do is to make sure your entrypoint for the client application is index.js and moved the shared folder into the create-react-app src folder. In my big project, this is where you want to start looking: /client/src/index.js.

Let me know if this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants