In the last video, we allowed the user to toggle a guest between "confirmed" and "unconfirmed". In this video, we're going to implement a slightly more complicated version of that feature. Instead checking a box on and off, we're going to let users toggle between an editing and a saved view.
You may have noticed at the 4:19 mark that Guil types
handeToggleEditing, leaving off the "l" in "handle". Typos like this can easily happen when you are writing your code, but as long as you are consistent they won't necessarily lead to errors. Thanks to auto-complete, Guil also uses
handeToggleEditing at the 5:15 mark when updating the
Guest.js component. Because he used the same name in both places, the code works as expected.
You need to sign up for Treehouse in order to download course files.Sign up