Markdown react project not working on codepen

Hello guys, could you take a look at my markdown react project and tell me what’s wrong? it’s not working and it’s giving me an error that I don’t understand:


It’s working on my local machine but it didn’t work when I moved it to codepen.
P.S: I’m using materia-ui as part of the project instead of bootstarp.

Take a look at this question and the answer that has 8 points


/Jakob

I think this implies if I didn’t use Bable as a preprocessor in JS.

I tried to do what was suggested on your Codepen using

const { Component } = React;
const { render } = ReactDOM;
const {Paper, Typography}  = 'material-ui/core';
const  { marked}  = 'marked';

and it made the

Uncaught ReferenceError: require is not defined

go away. It seems there is a problem with marked but I have not dived into that
/Jakob

Thanks for your help, I’ll try it again.

The error goes away from the editor but you can still see it in the console if you open it, as I can see.

Turned out I should write

const {Typography} = MaterialUI;
const {Paper} = MaterialUI;

and it worked (after I got material-ui from a cdn)