Question: I've `NSData` category for `base64Encoding` written in Obj-C.

```
@interface NSData (Base64)

+ (NSData*)dataFromBase64String:(NSString*)aString;
- (NSString*)base64EncodedString;

@end

```

Initially in Swift 2.2, I was using it as:

```
let dbPassData = NSData(fromBase64String: password)

```

Now, in Swift 3, there is no any `NSData`, instead have `Data`.

**How to use these category methods in swift 3?**

---

After converting project to Swift 3, it converted that line as:

```
let dbPassData = Data(fromBase64String: password)

```

which yields an error:

> 
> Argument labels do not match any available overloads
> 
> 
>

Answer: 
use 

`handleChange(event) {
 this.setState({newLineItem: event.target.value});
 }`

instead of

```
handleChange(e) {
    this.setState({newLineItem: event.target.value});
}

```
The warning occurs because of an error in the handler for the `onChange` event.

[Controlled components](https://facebook.github.io/react/docs/forms.html#controlled-components) require a handler for the `onChange` event. This allows the component to update its value. If the handler does not work, the `value` cannot be updated via the props and must be set via the value entered by the user.

To fix this error, you'll need to correct the error in the `onChange` event handler you defined:

```
// Parameter was renamed to 'event' to reflect its use in the 
// 'setState' method call below
handleChange(event) {
  this.setState({newLineItem: event.target.value});
}

```