Atom snippets for Redux. This snippets uses Babel(ES2015, ES2016), CoffeeScript, LiveScript syntax.
- Babel (ES2015, ES2016)
- CoffeeScript
- LiveScript
- import redux (rdx-ipt)
import { ${1:applyMiddleware, createStore, combineReducers, compose, bindActionCreators} } from 'redux';
- import react-redux (rdx-iptc)
import { ${1:Provider, connect} } from 'react-redux';
- action (rdx-act)
export function ${1:addTodo}($2) {
$4
return {
$3
};
}
- async-action (rdx-acta)
export function ${1:addTodo}($2) {
return (dispatch, getState) => {
$4
dispatch({
$3
});
};
}
- action-type (rdx-tp)
export const $1 = '$1';$2
- actions-map (rdx-map)
const actionsMap = {
[$1]: (state, action) => {
$2
}
};
- map-action (rdx-mapact)
[$1]: (state, action) => {
$2
}
- reducer (rdxer)
export default function ${1:todos}(state = initialState, action) {
$2
return state;
}
- middleware (rdx-mdw)
export default function $1({ dispatch, getState }) {
return next => action => {
${2: next(action);}
};
}
about LiveScript, CoffeeScript snippets generated code, see live.cson and coffee.cson.