Front End Development Libraries Projects - Build a Markdown Previewer

Tell us what’s happening:
Hello, I am working on one of the Projects and am unable to run the tests. Although I downloaded the template and had the testable projects menu, but found that it disappeared at some point. Checking through my code I found that if I remove the import/script to use React and ReactDOM it comes back, though of course my project no longer runs. I have tried several methods to get access to React and ReactDOM, but I can’t run the tests with any of them in my program.

Your code so far
I have completed the code, it should be in the link at the very bottom.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Front End Development Libraries Projects - Build a Markdown Previewer

Link to the challenge:

It looks like you’ve selected Babel for the JS preprocessor. Open the JS settings (click on the gear icon at the top right of the JS editor) and change the preprocessor to none.

Ya, ignore my suggestion, I think @kevinSmith’s is the correct one.

1 Like

I think the issue is here:

  <body id="app">
  </body>

You are targeting the body and React is messing with that. I assume the test suite uses that to render. If I change that to div, it works.

I assume you need the preprocessor for the JSX.

Also, those script imports should be handled in the Codepen JS settings, but that’s more of a Codepen issue.

3 Likes

This indeed fixed the problem, thank your for your help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.