mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
update plugins
ran the plugin update script
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
snippet ist
|
||||
import { createStore } from 'redux';
|
||||
snippet con
|
||||
connect(${1:mapStateToProps}, ${2:mapDispatchToProps})(<${3:VISUAL}/>);
|
||||
snippet act
|
||||
const ${1:actionName} = (${2:arg}) => {
|
||||
return {
|
||||
type: ${3:VISUAL},
|
||||
$2
|
||||
};
|
||||
};
|
||||
snippet rdc
|
||||
const ${1:reducerName} = (state={}, action) => {
|
||||
switch(action.type) {
|
||||
case ${1:action}:
|
||||
return {
|
||||
...state,
|
||||
$2
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
};
|
||||
};
|
||||
snippet mstp
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
${1:propName}: state.$1,
|
||||
};
|
||||
};
|
||||
snippet mdtp
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
${1:propName}: () => {
|
||||
dispatch(${2:actionName}());
|
||||
},
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user