diff --git a/snippets/Toggle.md b/snippets/Toggle.md index f70a12fff..92e86ab16 100644 --- a/snippets/Toggle.md +++ b/snippets/Toggle.md @@ -2,11 +2,10 @@ Renders a toggle component. -The `state` of the component default to `false` and bind the `handleClick` method to the component's context. +Initialize `state.isToggleOn` to `false`, bind the `handleClick` method to the component's context. Use an object, `style`, to hold the styles for individual components and their states. -Create a method, `handleClick`, which uses `Component.prototype.setState` to change the component's `state` from toggleOn to toggleOff and vice versa. -In the `render()` method, destruct `state` and `style` to abbreviate typing, use a `