Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "kpdux", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"author": "Kris Papercut <kearis666@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
@@ -22,7 +22,25 @@ # kpdux | ||
"reduces": { | ||
"REDUCER/TYPE": function(state, action) { | ||
if(/* */) { | ||
return { | ||
/* */ | ||
...state | ||
}; | ||
} | ||
return state; | ||
} | ||
}, | ||
"middlewares": { | ||
"MIDDLEWARE/TYPE": async function(action) { | ||
let state = this.getState(); | ||
await this.exampleAction(); | ||
} | ||
}, | ||
"getters": { | ||
getToken(state) { | ||
return state.token; | ||
} | ||
}, | ||
"mutations": { | ||
@@ -40,2 +58,5 @@ setToken(state, token) { | ||
this.setToken("your token"); | ||
}, | ||
async exampleAction() { | ||
} | ||
@@ -85,5 +106,3 @@ } | ||
const putStateToProps = (state) => { | ||
return { | ||
"token": state.auth.token | ||
}; | ||
return {}; | ||
}; | ||
@@ -93,2 +112,6 @@ | ||
return { | ||
// getters | ||
"token": state.auth.getToken(), | ||
// actions | ||
"login": store.auth.login | ||
@@ -95,0 +118,0 @@ }; |
11603
118