Last active
November 14, 2018 02:47
-
-
Save hpjaj/ce7d2d7f472466629de0c0e349fe0f2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // app/javascript/components/App.js | |
| import React from 'react' | |
| class App extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| Hello world! | |
| </div> | |
| ) | |
| } | |
| } | |
| export default App |
This file contains hidden or 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
| // app/javascript/components/App.js | |
| ... | |
| class App extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| <Switch> | |
| <Route exact path="/" component={Home} /> | |
| <Route exact path="/posts" component={Posts} /> | |
| <Route exact path="/new_post" component={NewPost} /> | |
| </Switch> | |
| </div> | |
| ) | |
| } | |
| } | |
| export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment