title: Make redux with redux-thunk action synchronous
body: <p>I need to make redux action and then use state to update my url. 
  I have tried to make a promise: </p>
  
  <pre><code>  const opa = (type: string, checked: boolean) =&gt; (
      dispatch: any,
      getState: any   ) =&gt;
      Promise.resolve().then(() =&gt; {
        return dispatch(sidebarEmploymentTypeActions.setType(type, checked))
      })
  </code></pre>
  
  <p>And then use it: </p>
  
  <pre><code>  const handleEmploymentTypeChange = (type: string, checked: boolean) =&gt; {
      //@ts-ignore
      dispatch(opa(type, checked)).then(console.log(employmentType))
    }
  </code></pre>
  
  <p>But console.log returns previous state. 
  My action: </p>
  
  <pre><code>export const setType = (type: string, checked: boolean) =&gt; {
    return {
      type: sidebarEmploymentType.SET_TYPE,
      employmentType: type,
      checked
    }
  }
  </code></pre>
  
  <p>And reducer: </p>
  
  <pre><code>const sidebarEmploymentType: Reducer = (
    state = defaultState,
    { type, employmentType, checked }
  ) =&gt; {
    switch (type) {
      case sidebarEmploymentTypeType.SET_TYPE:
        return {
          ...state,
          [employmentType]: {
            checked: checked,
            label: state[employmentType].label,
          },
        }
  
      default:
        return state
    }
  }
  
  export { sidebarEmploymentType }
  </code></pre>
  
  <p>Root reducer: </p>
  
  <pre><code>export const rootReducer = combineReducers({
  
    sidebarEmploymentType
  })
  </code></pre>
  
  <p>And store creation: </p>
  
  <pre><code>import thunk from 'redux-thunk'
      const store = createStore(
        persistReducer(persistConfig, rootReducer),
        composeEnhancers(applyMiddleware(thunk))
      )
  </code></pre>