Front-end project using Create-React-App

Hello ! I just finished the Front-End section of the formation, and I tried to do the first project, which is Random Quote Machine, with Create-React-App.

It’s working, in local, but I would like to put my code on CodePen, I saw there is another topic but there is only one answer, I tried to put

<script>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</script>

but it’s not working.

So I tried to put my code on CodePen :

I set all the parameters to include react, redux, redux-thunk etc…

but nothing appears, I don’t really understand why

Does someone have an idea ? Thank you :slight_smile:

This doesn’t really solve your problem with CodePen (I gave up trying to use it with React projects >.< ) but you could try using codesandbox.io instead. I found it to be more friendly for React/Redux projects and you can even import a Git repository and have all your dependencies automatically installed for you.

Might be an alternative if you can’t figure out how to get CodePen to behave.

Thank you for your answer, I will give it a try and I will update this message if it works :slight_smile:

EDIT : This is working great : https://codesandbox.io/s/6zlj9mvrz3

But I still don’t know how to add the tests from FreeCodeCamp CDN :frowning:

We can see it appear but it disappears when the page made with React appears

EDIT EDIT : I won ! I just needed to add an “external resource” instead of putting a script tag inside the index.hml file !

This won’t work.
You either write:

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"/>

Or you put actual JavaScript code in between the tags, like so:

<script>console.log("Hi mom!");</script>
1 Like

Oh yeah I forgot to mention that bit lol. But i’m glad it’s working for you!

I’ve had the same problem with CodePen. How do I add the “external resources” in codesandbox?