I have a PostFacade, which has state of type
export interface PostsState {
posts: Post[];
next: string | null;
selectedPost: Post | null;
}
I also have a GroupsFacade, with a state of
export interface GroupsState {
groups: Group[];
next: string | null;
selectedGroup: Group | null;
}
Each Post can be part of a Group. I would like to display group posts, what would be ideal place for it? New state? Replace PostsState with group posts?
Basically APIs are as
GET /api/posts
GET /api/groups/:id/posts
All posts have "pagination", I load more when you need them (that's the next property)