⚠️ This lesson is retired and might contain outdated information.

Write a "Hello World" React Component

Joe Maddalone
InstructorJoe Maddalone

Share this video with your friends

Send Tweet
Published 10 years ago
Updated 2 years ago

This lessons goes over what it takes to get React to output simple text to the browser such as Hello Eggheads. This lesson will also introduce stateless functional components. React uses JSX which is a "JavaScript syntax extension that looks similar to XML." While this is not required to use with React, it is highly recommended.

Nicholas Westby
Nicholas Westby
~ 10 years ago

Should the opening body tag be missing? Also, I don't see a semicolon after the return statement. Normally, I wouldn't mention these things, but being completely new to React (this is the first resource I've consumed on the subject), I thought I'd mention those items in case they confuse other people learning this.

Joe Maddalone
Joe Maddaloneinstructor
~ 10 years ago

Good catch on the body tag, oops! However, the semicolon is not required in this instance and the code would minify just fine. Hey, thanks for looking out for other viewers.

Joel Hooks
Joel Hooks
~ 10 years ago

I added the tags to this and the other lessons where it slipped through.

Michael Wight
Michael Wight
~ 8 years ago

I've a question: what kind of configuration do you use in sublime to have markup autocomplete in React? Are u using Emmet for autocomplete? Thx. Great tutorials!!!!

Rajitha
Rajitha
~ 8 years ago

Could you please explain default keyword in export default App. What are the other values it take and can we restrict Classes being imported for some and not for some other?

Kirk Sefchik
Kirk Sefchik
~ 8 years ago

What atom packages are you using?