Skip to content

Sample State

Tan Loc Phan edited this page Feb 6, 2018 · 13 revisions
{
  entities: {
    searchResult: {
      recipeIds: [2, 4, 5, 8, 9 ...]
    },
    recipes: {
      "2": {
        id: "2",
        author_id: "2",
        img_url: "...",
        rating: 3,
        difficulty: "easy",
        preparation_min: 15,
        baking_min: 0,
        resting_min: 0,
        ingredients: "..."
        text: "...",
        comment_ids: ["3", "5"]
      },
      "3": {
        id: "3",
        author_id: "9",
        img_url: "...",
        rating: 3,
        difficulty: "easy",
        preparation_min: 15,
        baking_min: 0,
        resting_min: 0,
        ingredients: "..."
        text: "...",
        comment_ids: ["1", "2"]
      },
    },
    stories: {
      "2": {
        id: "2",
        author_id: "2",
        img_url: "...",
        text: "...",
        comment_ids: [...]
      },
      "3": {
        id: "3",
        author_id: "10",
        img_url: "...",
        text: "...",
        comment_ids: [...]
      },
    }
    comments: {
      "1": {
        id: "1",
        author_id: "3",
        body: "...",
        like_num: 2
      },
      "2": {
        id: "2",
        author_id: "3",
        body: "...",
        like_num: 2
      },
      "3": {
        id: "3",
        author_id: "1",
        body: "...",
      },
      "5": {
        id: "5",
        author_id: "10",
        body: "...",
        like_num: 10
      },
    },
    users: {
      "3": {
        id: "3",
        username: "...",
        pic_url: "..."
      },
      "1": {
        id: "1",
        username: "...",
        pic_url: "..."
      }
    }
  },
  ui: {
  },
  session: {
    currentUser: {
      id: "3",
      username: "...",
      pic_url: "..."
    }
  },
  errors: {
    session: ["...", "..."]
  }
}
Clone this wiki locally