Created
October 9, 2018 23:33
-
-
Save superMDguy/d6dd19b10e3bc6ea11c72f66281d7b82 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
| function loadStuff() { | |
| state.loading = true | |
| fetch('//myapi.com/stuff') | |
| .then(res => res.json()) | |
| .then(data => { | |
| state.loading = false | |
| state.stuff = data | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment