title: React Error - Assign arrow function to a variable before exporting as module and
body: <p>I am trying to deploy the following source on Azure App Service via github connection but following errors are stopping the build but in my local linux box its working fine without any warning.</p>
  <p><strong>Error:</strong>
  src/context/alert/alertReducer.js
  Line 3:1:  Assign arrow function to a variable before exporting as module default  import/no-anonymous-default-export</p>
  <p>src/context/github/githubReducer.js
  Line 10:1:  Assign arrow function to a variable before exporting as module default  import/no-anonymous-default-export</p>
  <p><strong>alertReducer.js</strong></p>
  <pre><code>import { SET_ALERT, REMOVE_ALERT } from &quot;../types&quot;;
      
      export default (state, action) =&gt; {
        switch (action.type) {
          case SET_ALERT:
            return action.payload;
          case REMOVE_ALERT:
            return null;
          default:
            return state;
        }
      };
  </code></pre>
  <p><strong>githubReducer.js</strong></p>
  <pre><code>// Importing types
  import {
    SEARCH_USERS,
    SET_LOADING,
    CLEAR_USERS,
    GET_USER,
    GET_REPOS,
  } from &quot;../types&quot;;
  
  export default (state, action) =&gt; {
    switch (action.type) {
      case GET_USER:
        return {
          ...state,
          user: action.payload,
          loading: false,
        };
      case GET_REPOS:
        return {
          ...state,
          repos: action.payload,
          loading: false,
        };
      case SEARCH_USERS:
        return {
          ...state,
          users: action.payload,
          loading: false,
        };
      case CLEAR_USERS:
        return {
          ...state,
          users: [],
          loading: false,
        };
      case SET_LOADING:
        return {
          ...state,
          loading: true,
        };
  
      default:
        return state;
    }
  };
  </code></pre>