Created
February 6, 2021 15:31
-
-
Save touhidrahman/e64c60b347b3d0a1ed63009d4fab21c3 to your computer and use it in GitHub Desktop.
Medium article state management - initial state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface ViewArticlePageState { | |
| id: number | |
| article: Article | |
| comments: Comment[] | |
| searchTerm: string | |
| loading: boolean | |
| commentsPagination: { | |
| _limit: number | |
| _start: number | |
| _sort: string | |
| } | |
| } | |
| const initialState: ViewArticlePageState = { | |
| id: undefined, | |
| article: null, | |
| comments: [], | |
| loading: false, | |
| searchTerm: '', | |
| commentsPagination: { | |
| _limit: 10, | |
| _start: 0, | |
| _sort: '', | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment