I’ve looked all over the place but can’t seem to find how to make React work with CodePen. I’ve added ‘react’ and ‘react-dom’ to JS. I copy/pasted code that I had written in VSCode and was totally functional when I ran it on localhost, then cleaned up a few things to try to get it working in CodePen, but nothing is happening. Currently, it’s just a big blank screen:
Thanks for pointing that out! I thought I had imported the entire FA library by adding it to my CSS, but apparently that didn’t work. Do you know how I can fix the error?
Hmm. If it’s available via CDN ( google search) you might be able to get the CDN url and paste it into the javascript library area in Codepen someone. I’ve never tried doing that. Might be easier to just use a css library of icons.
I had a similar problem, even the Udemy instructor’s code cut and paste in didn’t work. The issue came down to the order of the two libraries in the Pen Settings for the JS panel. The React.Production… needs to be listed before the react-dom library when you specify in the Add External Scripts/Pens section. Sorta makes sense that the dom references bits from main library. And also specify Babel for the preprocessor.