Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed React by Example!
You have completed React by Example!
Preview
In this video, we'll implement the confirmed guest filtering function.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
which suggests we want to put a Boolean
on the state as we've done before.
0:00
So far we've been working with
the state of individual guests.
0:01
Well, now we want to filter guests, so
0:05
we'll need to treat the collection
of guests as a whole.
0:07
This means our new filter Boolean will sit
outside of the guest array in the state.
0:10
So in App.js,
I´ll add the Boolean to the initial state.
0:15
I´ll call it isFiltered,
and set it to false.
0:19
Now, I´ll write a handler to
set this property on the state.
0:24
And this will be easier than the other
handlers we've written because we won't
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up