로그인 과정

c에서 s로 토큰 전송, s는 토큰이 올바르면 세션 정보를 c에게 전송, c는 토큰을 스토리지에 저장

로그아웃 과정

비동기 저장소에 있는 userData를 삭제하고 리듀서에게 초깃값 반환

export const logout = () => {
  AsyncStorage.removeItem('userData');
  return { type: LOGOUT };
};
export default (state = initialState, action) => {
  switch (action.type) {
    ...
    case LOGOUT:
      return initialState;
    ...
  }
};

기타

참조