Things need to be set up in codepen for it to work, things that are being done behind the scenes for you on FCC for now. Can you provide a link to the pen where you tried this? We could better help you then.
Now we need to get our preprocessor and imports set up. Go to the JS settings. Make sure the JavaScript Preprocessor is set to Babel. (It may already be.) Now we need to import the correct libraries that React needs. In the “Search CDNjs” box, type in “react” select that and then do it for “react-dom”. Confirm that those are listed on the resources.
With that, you should have a basic, functioning React app in CodePen.