• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

redux-snippets

Atom Snippets for Redux
  • #react
  • #redux
  • #snippets
  • #es6
  • #babel
jhen0409
0.2.2 8,255
17
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Atom Redux Snippets

Atom snippets for Redux. This snippets uses Babel(ES2015, ES2016), CoffeeScript, LiveScript syntax.

Support Language

  • Babel (ES2015, ES2016)
  • CoffeeScript
  • LiveScript

Usage

  • 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.

LICENSE

MIT

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by