Controlling Inputs

Loading "Controlling Inputs"
๐Ÿ‘จโ€๐Ÿ’ผ When the user clicks on one of the checkboxes, we want to auto-fill that value into the search input for them. This means we need to "control" the input value so we can set it programmatically. We can do this by using the value prop on the input.
๐Ÿ“œ You can read up more on this in the React docs: Controlling an input with a state variable
Once we add the query as the value for the input, we'll also want to have a function responsible for updating the query when the user checks or unchecks the checkboxes and call that in the onChange handler of the checkboxes.
Good luck!

Please set the playground first

Loading "Controlling Inputs"
Loading "Controlling Inputs"

Access Denied

You must login or register for the workshop to view the diff.

Check out this video to see how the diff tab works.