Created
December 28, 2015 01:10
-
-
Save cem2ran/9be3dd3499566302d5ae 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/[email protected]"></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
@frostney, that shouldn't be a problem.
@kolodny: nice! I went a little further: https://react-play.surge.sh