### PasswordRevealer Renders a password input field with a reveal button. #### Class version Initially set `state.shown` to `false` to ensure that the password is not shown by default. Create a method, `toggleShown`, which uses `Component.prototype.setState` to change the input's state from shown to hidden and vice versa, bind it to the component's context. In the`render()` method, use a`
` to wrap both the`` and the `
); } } ``` ```jsx ReactDOM.render( , document.getElementById('root') ); ``` #### Function version Initialize a state variable `shown` to denote whether or not the password is revealed. Set its initial value to `false`. In the `render()` method, return a `
` element wrapping the `` element which holds the password and the `
) } ``` ```jsx ReactDOM.render( , document.getElementById('root') ); ```