Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
367 B

4 years ago
  1. # -*- mode: snippet -*-
  2. # uuid: a7bb3ea0-bf96-401b-851e-a63b254f42ba
  3. # contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
  4. # name: reduxReducer
  5. # key: rxreducer
  6. # --
  7. const initialState = {
  8. }
  9. export default (state = initialState, { type, payload }) => {
  10. switch (type) {
  11. case ${1:typeName}:
  12. return { ...state, ...payload }
  13. default:
  14. return state
  15. }
  16. }