Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| export default function usePromise(api) { | |
| const [state, dispatch] = useReducer( | |
| (state, action) => { | |
| switch (action.type) { | |
| case 'LOADING': | |
| return { ...state, loading: true } | |
| case 'RESOLVED': | |
| return { ...state, loading: false, response: action.response, error: null } | |
| case 'ERROR': | |
| return { ...state, loading: false, response: null, error: action.error } |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |