Full code: https://codepen.io/Assblack/pen/YbWyWw
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?