> For the complete documentation index, see [llms.txt](https://webcomp.gitbook.io/webcomp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://webcomp.gitbook.io/webcomp/handling-user-input.md).

# Handling User Input

Since WebComp components' architecture is virtually the same as React's, you can handle interactions in the similar way:

```jsx
class SuperInput extends WebComponent {
  handleChange = (e) => {
    this.setState({
      email: e.target.value,
    });
  }

  render() {
    return <input name="email" onInput={this.handleChange} />;
  }
}
```

#### Linked State

WebComp also provides convenient `linkState` method on a component which you can use to manage simple inputs:

```jsx
class SuperInput extends WebComponent {
  render() {
    return <input name="email" onInput={this.linkState('email')} />;
  }
}
```

Optionally, you can provide a second `path` argument to explicitly provide a dot-notated path to the new state value for more custom bindings.
