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 trialSerdar Halac
15,259 PointsLinks must not point to "#". Use a more descriptive href or use a button instead
Getting this error. Why is that? That was after I added the Header component to the JSX in app.js.
1 Answer
kyle pfromer
12,597 PointsInside the Header.js
component you should see something like this:
<header>
<span className="icn-logo"><i className="material-icons">code</i></span>
<ul className="main-nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Teachers</a></li>
<li><a href="#">Courses</a></li>
</ul>
</header>
This error is being thrown by the href="#"
in the link tags because create-react-app warns designers against bad practices. Designers usually use href="#"
as placeholder for links but create-react-app warns us that we should change it to an actual route because it doesn't do anything and we might have made a mistake.