title: redux how to use state
body: <p>I am getting an error on the following react redux code:</p>
  
  <p>This redux index </p>
  
  <pre><code>const AllReducers = combineReducers({
      foolow: follow_Reducer,
      vacations: vacations_Reducer,
      register: register_Reducer,
      follows: follows_Reducer,
      isLogged: logged_Reducer,
  });
  </code></pre>
  
  <p>This redux reducer </p>
  
  <pre><code>const follows_Reducer = (state = false, action) =&gt; {
      switch (action.type) {
          case 'FOLLOW':
              return !state
  
          case 'UNFOLLOW':
              return state
  
          default:
              return state;
      }
  }
  export default follows_Reducer;
  </code></pre>
  
  <p>This react </p>
  
  <pre><code>export default function Vacation() {
      const vacations = allvacations();
      const classes = useStyles();
      const [value, setValue] = React.useState('recents');
      const foolow = useSelector(state =&gt; state.foolow);
      const dispatch = useDispatch()
  
      &lt;BottomNavigation 
          value={value} 
          onClick={() =&gt; dispatch((foolow))} 
          onChange={handleChange} className={classes.root} 
      &gt;
          &lt;BottomNavigationAction 
              label="Follow" 
              value="Follow" 
              icon={&lt;FavoriteIcon /&gt;} 
      /&gt;
      &lt;/BottomNavigation&gt;
  }
  </code></pre>
  
  <p>That brings me an error</p>
  
  <p>Error: Actions must be plain objects. Use custom middleware for async actions.</p>