Skip to content

Instantly share code, notes, and snippets.

@mohammadobaid1
Created October 4, 2018 18:13
Show Gist options
  • Save mohammadobaid1/f46e2cf1db8d16143939897d9bf6cbd4 to your computer and use it in GitHub Desktop.
Save mohammadobaid1/f46e2cf1db8d16143939897d9bf6cbd4 to your computer and use it in GitHub Desktop.
MrNmBM
<!-- Our React app will be rendered inside this div -->
<div id="root"></div>
// Setup
// -----
// Click on "Settings" button and look into "JavaScript" settings, I've selected Babel preprocessor and imported two libraries i.e. React and ReactDOM
// ReactDOM is a library which provides us with the glue code to between the browser and React.js.
ReactDOM.render(<div>Welcome to a React.js Tut</div>, document.getElementById('root'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment