Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Router 4 Basics Going Further with Routing Navigating Routes Programmatically

Alan McClenaghan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alan McClenaghan
Front End Web Development Techdegree Graduate 45,539 Points

Add React Router 4 Basic project to online portfolio

Hi. I would like to add the course directory app to my portfolio. However as the files are not based at the homepage of my website, the Page Not Found component displays instead of the Home component. When the links in the Header are clicked, the components will then display correctly.

My app is located at http://alanmcclenaghan.com/react/course-directory/

Can anyone tell me how I can get the Home component to render at this location with the app working as expected when the links are clicked?

My files can be at https://github.com/AlanMcClenaghan/React-Router-4

I realize this question is old now but I honestly have no idea why you would add the example project for a Treehouse course to your portfolio. You didn't really build it. You were walked through the process for learning purposes. A project is only portfolio-worthy if you actually built it yourself, without an instructor walking you through it. Otherwise you cannot tell an employer that it is genuinely your work.

2 Answers

Alan McClenaghan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alan McClenaghan
Front End Web Development Techdegree Graduate 45,539 Points

I discovered that my hosting service allows me to create hosting packages without having an actual web domain to place them, which can then be viewed at a temporary web address which I can link to from my portfolio site.

http://react-router-4-basics-com.sites.stackstaging.com/

The React Router app is now at the home index of the temporary web address above.

It would still be interesting to discover if it is possible to place a React Router app as a subfolder of another website.

Cooper Runstein
Cooper Runstein
11,837 Points

Hmmm, I'm assuming you're not using React Router for your website, just this project you want to add to it?