Skip to content

Sample State

Tommy Pham edited this page Apr 3, 2018 · 10 revisions

Sample State

    {
      entities: {
        users: {
          1: {
            id: 1,
            username: "cowman92",
            blogUrl: "www.imaginarynumblr/users/1",
            profileImageUrl: "www.imapicture.com/312",
            currentUserFollow: true,
            followerCount: 324
          }
        },
        blogs: {
          5: {
            id: 5,
            authorId: 1,
            blogType: "photo",
            imageUrl: "www.imanuploadedphoto.com",
            body: "Here is a photo of PI",
            currentUserLikes: false,
            likeCount: 83
          }
          7: {
            id: 7,
            authorId: 94,
            blogType: "video",
            videoUrl: "www.linktovideo.com",
            body: "Seduction by mathematics",
            currentUserLikes: false,
            likeCount: 1
          }
          10: {
            id: 10,
            authorId: 42,
            blogType: "text",
            body: "I am the body of the blog. Insert LaTeX here",
            currentUserLikes: true,
            likeCount: 92
          },
          13: {
            id: 13,
            authorId: 62,
            blog_type: "gif",
            gifUrl: "www.imagiflink.com",
            body: "",
            currentUserLikes: true,
            likeCount: 92
          }
        }
      },
      ui: {
        loading: true/false
      },
      errors: {
        session: ["Incorrect username/password combination"],
        blog_form: ["Blog image url cannot be blank"]
      },
      session: {
        current_user: {
            id: 10,
            username: "moistie",
            profile_img_url: "www.currentuseravatar.com"
        }
      }
    }
Clone this wiki locally