Instructor: Often, users of the component that exposes our render prop API will have common use cases. For example, pretty much every user of the toggle component here is going to want to render a button that can toggle the state.
Here, we have two. Our API is going to change slightly so we can support this common use case. We are going to expose a toggler props object, which can be spread across any toggler button that our consumers want to render.
We are passing this.getStateAndHelpers to this.props.children. Let's go ahead and add a toggler props object here. This is going to have an OnClick handler for this.toggle and aria pressed is this.state.on.
Now, this functionality totally works. The consumer of our API doesn't need to concern themselves about what it takes to wire up these two buttons to be togglers and this toggle component.
In the future, we could change onClick to onKeyDown, if that made more sense. That could be an implementation detail of the toggle component. It allows consumers to apply the toggler props object to any button that they are rendering which fits this use case.