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 by Example Building the Application Toggling Edit State for Guests

Typo in the video

In the GuestList.js file, the prop name Guil wrote is handeToggleEditing instead of handleToggleEditing, although it doesn't matter now because it has been passed the way it is (Thanks to VS Code IntelliSense 😛).

Just want to aware if someone runs into this issue.

1 Answer

Lee Vaughn
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Lee Vaughn
Treehouse Teacher

Good eye Zaid Khan!

Your code may be different since it sounds like you spotted and fixed the typo on your end but the reason that Guil's code in the video and the code in the provided files works is because the name (handeToggleEditing) is the same in both the GuestList and Guest components. So even though the name might not look correct as far as spelling goes, all the code cares about is that the names are the same in the different places where it is referenced. If it would have been handeToggleEditing in the GuestList component and handleToggleEditing in the Guest component then it would have caused and error but since the names are the same it works as is.

As you touched on, this is one example of how a good text editor can help you when it comes to things like auto-completion. Even if you make a "mistake" as long as you are consistent things will often still work.

Thanks, Lee, This typo wouldn't have come to light if I not have watched the video dozens of times since I ran into my own typo.