This commit is contained in:
Brian Vaughn
2018-06-08 10:32:45 -04:00
parent e51668cb51
commit a5f0b2a251

View File

@@ -184,7 +184,7 @@ This also provides the flexibility to only reset parts of our component's intern
#### Alternative 2: Reset uncontrolled component with an instance method
More rarely, you may need to reset state even if there's no appropriate ID to use as `key`. One solution is to reset the key to a random value or autoincrementing number each time you want to reset. One other viable alternative is to exposing an instance method to imperatively reset the internal state:
More rarely, you may need to reset state even if there's no appropriate ID to use as `key`. One solution is to reset the key to a random value or autoincrementing number each time you want to reset. One other viable alternative is to expose an instance method to imperatively reset the internal state:
```js
class EmailInput extends Component {