-
-
Save davidbgk/2679cf20a9584d876285 to your computer and use it in GitHub Desktop.
React Getting Started - How it should be!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
const Hello = ({name}) => <h1>Hello {name}!</h1> | |
ReactDOM.render( | |
<Hello name={"vjeux"}/>, | |
document.body.appendChild(document.createElement("div")) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script src="https://jspm.io/system@0.19.js"></script> | |
<script> | |
System.config({ | |
transpiler: 'babel', // or 'traceur' or 'typescript' | |
babelOptions: {} // or traceurOptions or typescriptOptions | |
}); | |
System.import('./main.js'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment