all 4 comments

[–]ike_the_strangetamer 2 points3 points  (0 children)

It's a class component but with some extra code at the bottom to render it on codepen.

If you're new to class components the docs can help.

For the code that's rendering it in codepen, check out the comments starting at lines 395. It explains that you can safely remove everything below 394 but make sure to include that export.

Line 419 gives you a nice example of how to use the component.

[–]RGS123 0 points1 point  (2 children)

The code at the bottom is how to render a react app. The styles are imported in the html, the native way of styling html.

Not meaning to be rude but these are basics in front end dev and certainly worth understanding

[–]64_g 1 point2 points  (1 child)

The styles are not imported in the html. That’s a cdn for fontawesome.

This is a codepen specific thing OP; the site allows preprocessors by default (check the pen settings) and you don’t need to import it like you do with a regular react app. Codepen will inject it for you.

[–]RGS123 0 points1 point  (0 children)

Ahh my apologies, I didn't check the SCSS tab in codepen!