Skip to content

Sample State

lfs48 edited this page Mar 27, 2019 · 2 revisions
{
  entities: {
    users: {
      1: {
        id: 1,
        url: 'firstuser',
        email: 'email@email.com',
        authoredPostIds: [1],
        authoredCommentIds: [1],
        likedPostIds: [1],
        followerIds: [2]
        followingIds: [1, 3]
      },
    },
    posts: {
      1: {
        id: 1,
        authorId: 1,
        userId: 1,
        body: 'Lorem ipsum',
        type: 'text',
        likedIds: [1],
        commentIds: [1],
      },
    comments: {
      1: {
        id: 1,
        postId: 1,
        authorId: 1,
        body: 'lorem ipsum',
      },
    tags: {
        1: {
          id: 1,
          tag: 'stuff'
        },
      },
    follows: {
      1: {
        followerId: 1,
        followeeId: 2,
        type: 'user'
      },
      2: {
        followerId: 2,
        followeeId: 1,
        type: 'user'
      },
      3: {
        followerId: 1,
        followeeId: 1,
        type: 'tag'
      },
    },
  },
  ui: {
    loading: false
  },
  errors: {
    login: ["Incorrect username/password."],
    postForm: ["Your post can't be empty."],
  },
  session: { 
    currentUserId: 1 
  }
}
Clone this wiki locally