Deprecation warning: See for new link -React Getting Started — The MERN Stack Tutorial!
Bryan Gilbraith

Hi Bryan,

Thanks for the brilliant tutorial. I keep having this problem in my Comment.js file:

Comment.js:60 Uncaught (in promise) TypeError: Cannot read property 'toString' of undefined
at Comment.rawMarkup (Comment.js:60)
at Comment.render (Comment.js:67)
at ReactCompositeComponent.js:796
at measureLifeCyclePerf (ReactCompositeComponent.js:75)
at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:795)
at ReactCompositeComponentWrapper._renderValidatedComponent (ReactCompositeComponent.js:822)
at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:362)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:258)
at Object.mountComponent (ReactReconciler.js:46)
at Object.updateChildren (ReactChildReconciler.js:121)

I tried to debug by putting a console.log() like this and get “undefined”.

rawMarkup() {
let rawMarkup = marked(this.props.children.toString());
return { __html: rawMarkup };

Could you help me figuring out which part I did wrong? Thanks a lot!

Like what you read? Give tony kung a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.