You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-1Lines changed: 72 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,4 +312,75 @@ export default Button;
312
312
313
313
```
314
314
315
-
5. Start your server `npm start` and check if your bootstrap import works as well as the test button!
315
+
5. Start your server `npm start` and check if your bootstrap import works as well as the test button! If all is displaying then we are almost done. We are sooooo close!
316
+
317
+
We want our button to actually call the API now so lets create the function with the appropriate call. We want to add an onclick event to the button html like so:
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.
0 commit comments