Markdown previewer- the preview is not being converted to markdown

when i type in the editor it shows up in the preview but does not convert to markdown language. Does anyone know why?

const defaultEdit = "#heading";

class Presentational extends React.Component{
    this.state ={
      input: defaultEdit
    this.handleChange = this.handleChange.bind(this);
    const markdown = marked(this.state.input);
    const innerHTML = {__html: markdown};
    return (
      <div class="row">
        <div class="col-md-6">
           <textarea id="editor" onChange={this.handleChange} class= "form-control">{this.state.input}</textarea>
        <div class="col-md-6">
          <div id="preview" dangerouslySetInnerHTML ={innerHTML}></div>

ReactDOM.render(<Presentational />, document.getElementById("app"));

see on codepen:

In your pen, the correct way to write the markdown in the preview would be # header There needs to be the space.

You can review this markdown cheat sheet for a reference to Markdown syntax

Your code seems to be working for me and converting to markdown just fine.

I would change the first line though to:

const defaultEdit = "# heading";

Since leaving a space between a hashtag and the heading does make a difference.
Make sure you are familiar with markdown basic syntax as shown in this guide Basic Syntax | Markdown Guide

thank you so much :sweat_smile: 30mins of my life im never getting back.