# Submitted work but Am receiving the following error please help. My input renders when I type

**URL:** <https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800>\
**Category:** General\
**Created:** [August 6, 2020, 5:36am UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800 "2020-08-06T05:36:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreyes61](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dreyes61/32/106986_2.png) [@dreyes61](https://forum.freecodecamp.org/u/dreyes61)\
**Post date:** [August 6, 2020, 5:36am UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800/1 "2020-08-06T05:36:59Z")

</div>

Typing in the input element should update the state and the value of the input, and the `p` element should render this state as you type.

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [August 6, 2020, 5:44pm UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800/2 "2020-08-06T17:44:42Z")

</div>

We would need to see your code in order to have any chance of helping you fix it.

---

<div class="post-metadata">

**Author:** ![dreyes61](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dreyes61/32/106986_2.png) [@dreyes61](https://forum.freecodecamp.org/u/dreyes61)\
**Post date:** [August 7, 2020, 5:35am UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800/3 "2020-08-07T05:35:23Z")

</div>

Here’s my code:

```auto
class ControlledInput extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: ""
    };
    this.handleChange = this.handleChange.bind(this);
  }
  handleChange(event) {
    this.setState({ value: event.target.value });
  }

  render() {
    return (
      <div>
        <h4>Controlled Input:</h4>
        < p> <input type="text" value={this.state.value} {this.handleChange} /></p></div>

    );
  }
};

```

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [August 7, 2020, 7:05am UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800/4 "2020-08-07T07:05:02Z")

</div>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](http://www.freecodecamp.com/forum/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

* * *

1. You have an `input` property on the state object but you are setting a `value` property inside the setState call inside your `handleChange` method.

2. You didn’t add the input element where the challenge told you to add it.

3. The input elements `value` attribute is set to the wrong state property (should be `input` not `value`).

4. The input element is missing the `onChange` attribute which is what should be assigned the `handleChange` method.

5. You changed the `p` element it needs to remain like it was in the starter code.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:43pm UTC](https://forum.freecodecamp.org/t/submitted-work-but-am-receiving-the-following-error-please-help-my-input-renders-when-i-type/413800/5 "2021-06-01T18:43:52Z")

</div>

Closed on June 1, 2021, 6:43pm UTC


