Markdown Previewer_Code not rendering

Hello. I wondered if I could get some help with my project. For some reason the code in the return statement is not rendering.

When I leave out

defaultValue={this.state.input}
onChange={this.handleChange.bind(this)}
id='textInput'

in the textarea, the code renders.

Looking at your console output (which is always a good idea), it says:

If you supply defaultValue on a <textarea>, do not pass children.

That means, make textarea a self closing tag and put ‘Write something here…’ into state, to make it work.

1 Like