You shouldn't need to view the video to answer my question, but it is available here: http://www.lynda.com/React-js-tutorials/React-js-syntax/379264/413770-4.html
I'm starting to learn react.js for the very first time (I'm pretty skilled in HTML/Javascript already), but the very first simple project is not working correctly.
The example code they give, should output "Hello World" to the page.
<!DOCTYPE html>
<html>
<head>
<script src="https://--.--/react-0.13.3.min.js"></script>
<title>My First React File</title>
</head>
<body>
<script>
React.render(React.createElement('div', null, 'Hello World'), document.body);
</script>
</body>
</html>
Facebook's github has a much more up-to-date react file, 15.0.1, so my code only differs with the updated files:
<!DOCTYPE html>
<html>
<head>
<script src="https://--.--/react-15.0.1.min.js"></script>
<script src="https://--.--/react-dom-15.0.1.min.js"></script>
<title>My First React File</title>
</head>
<body>
<script>
React.render(React.createElement('div', null, 'Hello World'), document.body);
</script>
</body>
</html>
Their example outputs "Hello World" correctly, and mine does nothing.
Should I be using a different training to learn React? I feel silly asking a question about such a simple line of code.
PS: I had to censor the file names to meet Stack Overflow standards of not using URL shorteners, but they are the files located here: https://facebook.github.io/react/downloads.html
Edit: I just noticed the video just came out on 2/17/16, so it can't be that out of date.. must be my mistake somewhere? Any help is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…