Skip to content

Instantly share code, notes, and snippets.

@talyssonoc
Created January 22, 2019 14:25

Revisions

  1. talyssonoc created this gist Jan 22, 2019.
    14 changes: 14 additions & 0 deletions spinner.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    import { AUTH } from './actionTypes';

    export const reducer = (state, action) => {
    switch(action.type) {
    // ...
    case AUTH.SIGN_IN_SUCCESS:
    case AUTH.SIGN_IN_ERROR:
    return {
    ...state,
    showSpinner: false
    };
    // ...
    }
    };