Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

I follow the video and did everything right, when I try to submit a name and a topic it leads me to page not found??

Anything i did wrong? please help.

import React, { Component } from 'react';

class Home extends Component {

handleSubmit = (e) => { e.preventDefault(); let teacherName = this.name.value; let teacherTopic = this.topic.value; let path = teachers/${teacherTopic}/${teacherName}; this.props.history.push(path); }

render() { return ( <div className="main-content home"> <h2>Front End Course Directory</h2> <p>This fun directory is a project for the <em>React Router Basics</em> course on Treehouse.</p> <p>Learn front end web development and much more! This simple directory app offers a preview of our course library. Choose from many hours of content, from HTML to CSS to JavaScript. Learn to code and get the skills you need to launch a new career in front end web development.</p> <p>We have thousands of videos created by expert teachers on web design and front end development. Our library is continually refreshed with the latest on web technology so you will never fall behind.</p> <hr /> <h3>Fratured Teachers</h3> <form onSubmit={this.handleSubmit}> <input type="text" placeholder="Name" ref={ (input) => this.name = input } /> <input type="text" placeholder="Topic" ref={ (input) => this.topic = input } /> <button type="submit">Go!</button> </form>

  </div>
);

} }

export default Home;