forgive me i\'ve searched everywhere and I\'m new in reactjs and trying out examples. I have an error
Uncaught ReferenceError: mountNode is not defined
<
Being the accepted answer done, I'd like to add one thing: Don't forget to include references to all necessaries js's libs in your html head section if you are testing this out of "kit examples folder"
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://npmcdn.com/react@15.3.1/dist/react.js"></script>
<script src="https://npmcdn.com/react-dom@15.3.1/dist/react-dom.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
You need to tell React where to mount the <UserGist />
component. You probably want to replace mountNode
with document.getElementById('example')
to refer to your <div id="example"></div>
element:
React.render(
<UserGist source="https://api.github.com/users/octocat/gists" />,
document.getElementById('example')
);