Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMahmoud Nasser
5,507 PointsRendering on the browser with react
i am confused i open the index.html file without setting up any local server and everything renders on the screen however,when i set up the local server it doesnt work and just a blank page and that shouldnt happen any help please
Mahmoud Nasser
5,507 Pointsconst title=React.createElement(
'h1',
{id:'main-title',title:'This is a title.'},
'My First React Element!'
);
const desc=React.createElement(
'p',
null,
"am a React Developer!"
);
const header=React.createElement(
'header',
null,
title,desc
);
ReactDOM.render(
header,
document.getElementById('root')
);
in the video guil is running on local host and uses CDNs from react.org
Adam Beer
11,314 PointsMark where you are in the course and then I can check the video.
Mahmoud Nasser
5,507 PointsAdam Beer i think i figured it out but another proplem pooped up that whenever i change or update anything in my code it doesnt reflect on the server (old output only before changing code)
Adam Beer
11,314 PointsBravo! Please share where are you in the course, so which video are you watching? Sorry, but if I didn't see Guil whole code, I can't find the fault.
Adam Beer
11,314 PointsAdam Beer
11,314 PointsPlease show your whole code.
Code
Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.