Created
May 31, 2016 04:03
-
-
Save octavioturra/0b2901d305747adb5132b131a0f4ca89 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