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

typescript-duck-snippet

Just the simple Duck snippet for React/Redux and TypeScript
  • #react
  • #redux
  • #typescript
  • #duck
  • #snippet
Ky6uk
1.0.1 671
1
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Atom Duck snippet for React/Redux and TypeScript

The Duck snippet for React/Redux. This snippet uses TypeScript syntax.

The Snippet

Trigger Content
duck the snippet

Generated Code

interface Action {
  readonly type?: string;
}
 
const defaultState = {};
 
// Actions
const ACTION = 'duck-name/ACTION';
 
// Reducer
export default function reducer(state = defaultState, action: Action = {}) {
  switch (action.type) {
    case ACTION: {
      return state;
    }
 
    default: {
      return state;
    }
  }
}
 
// Action Creators
 
export function actionCreator() {
  return { type: ACTION };
}
 

License

MIT License © Roman Nuritdinov (Ky6uk)

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