Created
April 4, 2016 22:32
-
-
Save ryanbrunner/1cbbbeebd5c00c7c35a045e9f1df09b7 to your computer and use it in GitHub Desktop.
Sample 1 for React
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 ReactOnRails from 'react-on-rails'; | |
// Simple example of a React "dumb" component | |
export default class SimpleHelloWorld extends React.Component { | |
render() { | |
return ( | |
<div className="container"> | |
Hello, { this.props.name }! | |
</div> | |
); | |
} | |
} | |
ReactOnRails.register({ SimpleHelloWorld }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment