Skip to content

Commit 1f44358

Browse files
authored
Update README.md
update
1 parent b78366f commit 1f44358

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,27 @@ class Button extends Component {
450450
export default Button;
451451
```
452452

453+
7. Finally, let's open our ```App.js``` file in the /src directory to add our new Button Component to the App itself. Check below to see the example. Don't forget that we need to enclose the ```<Button />``` in two ```<div></div>``` tags!
454+
```javascript
455+
import React, { Component } from 'react';
456+
import logo from './logo.svg';
457+
import './App.css';
458+
459+
import Button from './components/Button';
460+
461+
class App extends Component {
462+
render() {
463+
return (
464+
<div>
465+
<Button />
466+
</div>
467+
);
468+
}
469+
}
470+
471+
export default App;
472+
```
473+
453474
This should be everything we need to setup the API. Simply click our test api call button and see the magic work!
454475

455476
Congratulations! Our Rails API and React Client is done!

0 commit comments

Comments
 (0)