Skip to content

Commit cbe5400

Browse files
authored
Update README.md
1 parent ba460c3 commit cbe5400

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ and our custom function PLUS the initial state set to null
347347
After copying and pasting both snippets inside the `Button.js` file, we fetch from the url `http://localhost:3000/api/v1/movies` in a json format and once we return a true response we will set the response to the data variable and console log the results into the browser.
348348

349349
This should be the complete Button.js file below!
350-
```javascript
351350

351+
```javascript
352352
import React, { Component } from 'react';
353353

354354
class Button extends Component {
@@ -358,19 +358,19 @@ class Button extends Component {
358358
const api_call = await fetch('http://localhost:3000/api/v1/movies');
359359

360360
const data = await api_call.json();
361-
361+
362362
console.log(data);
363363
}
364364

365-
365+
366366
render() {
367367
return (
368368
<div>
369-
<div class="card container mt-3">
370-
<div class="card-body">
371-
<div class="row">
369+
<div className="card container mt-3">
370+
<div className="card-body">
371+
<div className="row">
372372
<center>
373-
<button class="btn btn-primary" onClick={this.callApi}>Test Call!</button>
373+
<button className="btn btn-primary" onClick={this.callApi}>Test Call!</button>
374374
</center>
375375
</div>
376376
</div>
@@ -382,5 +382,11 @@ class Button extends Component {
382382

383383
export default Button;
384384

385-
386385
```
386+
387+
388+
389+
390+
"proxy": "http://127.0.0.1:3000",
391+
392+

0 commit comments

Comments
 (0)