Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roadmap #17

Open
icepeng opened this issue Jan 3, 2018 · 0 comments
Open

roadmap #17

icepeng opened this issue Jan 3, 2018 · 0 comments

Comments

@icepeng
Copy link
Owner

icepeng commented Jan 3, 2018

card.module

Actions

  • Load (payload: Card[])

Effects

none

Reducers

  • Card
export interface State extends EntityState<Card> {
  selectedCardCode: string | null; // 굳이 여기 필요한가?
}

export const adapter: EntityAdapter<Card> = createEntityAdapter<Card>({
  selectId: (card:Card) => card.code,
  sortComparer: false,
});

export const initialState: State = adapter.getInitialState({
  selectedCardCode: null,
});

export function reducer(
  state = initialState,
  action: CardActions,
): State {
  switch (action.type) {
    case CardActionTypes.Load: {
      return {
        ...adapter.addAll(action.payload, state),
        selectedCardCode: state.selectedCardCode,
      };
    }

    default: {
        return state;
    }
}
  • Index
    • 대충 하던대로

stat.module

  • stat-data와 stat-display(Lazy)로 나눠야 할까?
  • Presentation Component에는 데이터를 중첩된 형태로 vs. Card Dictionary + Stat Array 형태로
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant