Tell us what’s happening:
I am stuck on the second challenge of the Frontend Certification Project. Bellow you can see my code. The two lines 51 and 68 when not commented make all my render disappear. Can anyone help me?
Your code so far
Code Pen page: https://codepen.io/belaguarino/pen/dyVRmPb
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36
Challenge: Build a Markdown Previewer
Link to the challenge:
lasjorg
December 20, 2021, 1:26pm
2
Look in the browser console Uncaught TypeError: marked is not a function
Check the docs on which method you should be using marked.parse
FYI, The library had a major version update with breaking changes, check the release note .
react-dom.production.min.js:177 Uncaught TypeError: marked is not a function
at Markdown.render
I tried deleting and adding again but it did not work.
lasjorg
December 20, 2021, 1:37pm
5
Did you check the docs and the release note?
When using marked in a script tag use marked.parse(...)
instead of marked(...)
Yeah, now it works because of the .parse. Thanks.
1 Like
lasjorg
December 20, 2021, 1:50pm
7
No problem. I would suggest you take this as a learning experience.
Always look in the console (don’t use the Codepen console).
Always read the docs.
Happy coding,
system
Closed
June 21, 2022, 1:50am
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.