Tell us what’s happening:
Describe your issue in detail here.
Hi I am having trouble with adding ### User Story #4: When I enter GitHub flavored markdown into the #editor element, the text is rendered as HTML in the #preview element as I type (HINT: You don’t need to parse Markdown yourself - you can import the Marked library for this: https://cdnjs.com/libraries/marked).### my entire screen goes blank especially adding the ##dangerouslySet … in my JS Your code so far
please see link
" There can be only one special method with the name constructor in a class. Having more than one occurrence of a constructor method in a class will throw a SyntaxError error ."
"[Package Error] 'marked@v4.2.12' could not be built.
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall...
Failed to load node_modules/marked/bin/marked.js
Unexpected token (1:0) in marked/bin/marked.js
Install failed.
Install failed."
I think is something related with import for marked library.
I can see multiple attempts to import it in the code.
It may be more easy to keep the imports in one place rather than 3 different places (html, js, and Settings)
You can move the import for react in Settings too.
Is just a matter of preferences but whichever way you want to reference js libraries, try to be consistent.
You are trying to use variables in scopes they are not available in.
For example:
if (action === "calculate") {
// expression is blocked scoped to the if statement
let expression = `${keys.dataset.firstValue} ${keys.dataset.operator} ${displayedNum}`;
}
// expression does not exist in this outer scope
display.textContent = eval(expression);