This project seems to be done but isn’t passing test 3. Any help understanding why would be greatly appreciated.
I looked through the forum but more ‘not passing tests’ posts are in regard to bonuses or involve smaller errors not present here.
app component
const App = () => {
return (
<Previewer />
);
}
ReactDOM.render(<App />, document.querySelector('.container'));
previewer component
export default class Previewer extends Component {
componentDidMount() {
this.setState({ html: marked(this.state.markdown, { breaks: true, })});
}
constructor(props) {
super(props);
this.state = {
markdown:
`# Welcome to my React Markdown Previewer!
markdown from challenge example...

`,
html: '',
};
}
handleChange(value) {
this.setState({ markdown: value, html: marked(value, { breaks: true, }), });
}
render() {
return (
<div className='wrapper'>
<div className='editor'>
<h6 className='bio'>Coded by <a href='https://github.com/RicardoL-AFati'>Ricardo Ledesma</a></h6>
<label htmlFor='editor'>Editor</label>
<br />
<textarea id='editor' rows='30' cols='50'
value={this.state.markdown}
onChange={event => this.handleChange(event.target.value)} />
</div>
<div className='previewDiv'>
<label>Previewer</label>
<br />
<div dangerouslySetInnerHTML={{__html: this.state.html}} id='preview'></div>
</div>
</div>
);
}
}
Because I am using state? I tried placing the test script tag before and after my bundle script tag.
Please help! These test really seem to not be fully fleshed out yet, at least not with React. I am having trouble with previous project as well