Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Basics First Steps in React Render an Element

M J
M J
7,292 Points

Is anyone else having issues getting anything to render in the screen?

The entire module for React Basics is not working. Has anyone in 2021 been able to get there heading onto the screen?

Here is a snapshot of my code: https://w.trhou.se/c33b4hg4z6

3 Answers

alexx1000
alexx1000
16,146 Points

Hi everybody! I'm having the same issue. I ran npm install --global http-server and npx http-server. Windows Powershell says that the server is running! but the screen is NOT rendering anything. My workspace is also NOT rendering at all: https://teamtreehouse.com/workspaces/41840849

Is there somebody else who can help me? Thanks in advance! :)

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi M J! Thanks for providing a helpful snapshot of your Workspace.

It looks like you have a minor typo on line 13cost should be const:

const header = React.createElement(
  'header',
    null,
    title,
    desc
);

I tested that and all worked as expected. :)

M J
M J
7,292 Points

Thank you Guil! Unfortunately even with the corrections, workspaces does not render to the screen. Was this course intended just to be used with VS code? And not workspaces? That could be my problem...

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi M J. It's intended to be used with both. Were you able to set up a local development server to run your project? This video talks a little bit about running your project outside of Workspaces (at 3:15), and the teacher's notes provide resources to running one using VS Code and other ways.

Hope this helps :)