1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Simplify example in naming conventions for sources

This commit is contained in:
Brett Sun 2016-01-15 13:58:15 +01:00
parent f4eef6b7c8
commit b3d6620f73

View File

@ -22,12 +22,8 @@ refreshApplicationToken
we cannot repeat this for a sources' methods as patterns like this would emerge in the stores: we cannot repeat this for a sources' methods as patterns like this would emerge in the stores:
```javascript ```javascript
onFetchCurrentUser(invalidateCache) { onFetchCurrentUser() {
this.invalidateCache = invalidateCache; this.getInstance().fetchCurrentUser(); // does not call a flux "action" but a method in user_source.js - which is confusing
if(!this.getInstance().isLoading()) {
this.getInstance().fetchCurrentUser(); // does not call a flux "action" but a method in user_source.js - which is confusing
}
} }
``` ```
@ -67,4 +63,4 @@ lookupCurrentUser: {
UserActions.logoutCurrentUser UserActions.logoutCurrentUser
UserStore.onLogoutCurrentUser UserStore.onLogoutCurrentUser
UserSource.performLogoutCurrentUser UserSource.performLogoutCurrentUser
``` ```