-
-
Save octaviogb/20057285f88c5c32eca76fabae9fce55 to your computer and use it in GitHub Desktop.
Fetch secured
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
class Fetch { | |
create(store : object) { | |
if(!window.__fetch) { | |
window.__fetch = new Fetch() | |
} | |
Object.defineProperty(window.__fetch, 'state', { | |
get() { | |
return store.getState().login | |
} | |
}); | |
return window.__fetch; | |
} | |
onTokenChange(cb : function) { | |
this._onTokenChange = cb; | |
} | |
checkStatus(request) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment