Problems with Markdown Previewer

Problems with Markdown Previewer


Hi, I’m having some problems with the Markdown Previewer, here is the link:

The updatePreview method is not doing anything, what am I doing wrong with onChange?

updatePreview = (event) => {

<Editor value={this.state.previewText} onChange={(event) => this.updatePreview(} />



The onChange event is triggered on the texarea element, not on your custom Editor component^^

<textarea id="editor" onChange={this.props.onChange}>

Adding this will make that works ^^

You can avoid to manually pass the event:


This should works aswell :slight_smile:


That fixed it, thank you!!

I saw that it was passing the onChange prop but I thought that’s all I needed to do.