Markdown previewer: Why this simple thing doesn´t work

Full code:

So I have the same value on both components, the Editor and the Previewer:

<Editor onChange={this.handleChange} value={this.state.mark} />
        <Previewer value={this.state.mark}/>

So I just added the “marked” method on to the value of the previewer and I thought it would work:

<Editor onChange={this.handleChange} value={this.state.mark} />
        <Previewer value={marked(this.state.mark)}/>

But it doesn´t.

I read the github page and it seemed simple:

 marked('# Marked in the browser\n\nRendered by **marked**.');

What I´m not taking into account exactly?

Look at dangerouslySetInnerHTML

Thanks I read it and did this in my Previewer component

<div id="preview" dangerouslySetInnerHTML={marked(this.props.value)}

Still doesn´t work :S

You missed this part, the data needs to be passed in very particular way.

pass an object with a __html key